Zen-Cart Sales Report
If you need a quick report that shows you the sales for a year by model and the monthly average then this is for you.
This SQL query needs to be executed against your database. To use this SQL database query you will need to go http://your-domain/cpanel > phpmyadmin and select your Zen-Cart database > open SQL tab, then copy and paste the relevant query and update the variables as required.
Copy and paste this SQL query into the SQL tab and change the dates, be sure to always make the date range a year otherwise the monthly average will not be correct.
SELECT op.products_id as “product ID”, op.products_model as Model, sum( op.products_quantity ) AS Qty, round( sum( op.products_quantity ) /12, 0 ) AS MonthQty
FROM zen_orders_products AS op, zen_orders AS o
WHERE op.orders_id = o.orders_id
AND o.date_purchased >= “2009-06-01″
AND date_purchased <= “2010-05-30″
GROUP BY op.products_id
ORDER BY Qty DESC
Join the forum discussion on this post
No related posts.
Related posts brought to you by Yet Another Related Posts Plugin.
