SELECT o.OrderID, o.OrderDate, od.GiftTrakNumber, CONCAT(o.BillingFirstName, ' ', o.BillingLastName) AS Name, o.BillingState,
CASE
	WHEN o.BillingCountry IN('United States', 'US', 'USA') THEN CASE
		WHEN o.BillingState IN('CT','DE','GA','ME','MD','MA','NH','NJ','NY','NC','OH','PA','RI','SC','VT','VA','WV') THEN '1 Eastern'
		WHEN o.BillingState IN('AL','AR','FL','IL','IN','IA','KY','LA','MI','MN','MS','MO','OK','TN','WI') THEN '2 Central'
		WHEN o.BillingState IN('AZ','CO','KS','MT','NE','NM','ND','SD','TX','UT','WY') THEN '3 Mountain'
		WHEN o.BillingState IN('CA','ID','NV','OR','WA') THEN '4 Pacific'
		WHEN o.BillingState IN('AK') THEN '5 Alaska'
		WHEN o.BillingState IN('HI') THEN '6 Hawaii-Aleutian'
		ELSE '(unknown)'
	END
	ELSE '('+o.BillingCountry+')'
END as TimeZone,
o.Custom_Field_CATStatus,
TIMESTAMPDIFF(day, DATE(o.OrderDate), NOW()) AS DaysOld,
-- TIMESTAMPDIFF(month, DATE(o.OrderDate), @thisDay) AS MonthsOld,
ROUND(TIMESTAMPDIFF(day, DATE(o.OrderDate), NOW())/30, 1) AS MonthsOld,
od.OrderDetailID, od.ProductCode, od.ProductNote

FROM orderdetails od
JOIN orders o ON od.OrderID = o.OrderID
-- JOIN Customers c ON o.CustomerID = c.CustomerID -- No information there since new Volusion checkout

WHERE o.Custom_Field_CATStatus LIKE 'CALL%'

GROUP BY o.OrderID, o.OrderDate, od.GiftTrakNumber, CONCAT(o.BillingFirstName, ' ', o.BillingLastName), o.BillingState, o.BillingCountry, o.Custom_Field_CATStatus, od.OrderDetailID, od.ProductCode, od.ProductNote
ORDER BY o.OrderDate
;