Hi, I'm trying to create a query for a report that summarizes items ordered and option details.
I can't find order item option details. Anyone know which table they are in? I'm guessing they're serialized in either the order_details extra column, or the order_data data column. If so, is there any way to make sense of them in sql or is it necessary to use php?
Here's what I have so far which is 90% there:
SELECT MONTH(FROM_UNIXTIME(orders.`timestamp`)) as mo, pd.product, pd.product_id, count(pd.product) as cnt FROM (cscart_order_details od INNER JOIN cscart_product_descriptions pd ON (od.product_id = pd.product_id) ) INNER JOIN cscart_orders orders ON (orders.order_id = od.order_id) WHERE orders.status = 'C' and YEAR(FROM_UNIXTIME(orders.`timestamp`)) = 2016 GROUP BY 1, 2
Thanks for any help,
Don