Created
May 27, 2011 10:31
-
-
Save aj-justo/995010 to your computer and use it in GitHub Desktop.
Zen Cart SQL: Get average order total for given time period
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT AVG(o.order_total),COUNT(*) | |
FROM orders o, `orders_total` ot | |
WHERE o.orders_id=ot.orders_id AND | |
o.orders_status=3 AND | |
o.date_purchased BETWEEN '2010-4-01' AND '2010-4-31' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment