Skip to content

Instantly share code, notes, and snippets.

@CajuCLC
Created October 25, 2018 19:55
Show Gist options
  • Save CajuCLC/b9cebb35d30d1ace9144c97e950dfb69 to your computer and use it in GitHub Desktop.
Save CajuCLC/b9cebb35d30d1ace9144c97e950dfb69 to your computer and use it in GitHub Desktop.
Get total orders for a store for a period of time
SELECT COUNT(total_qty_ordered) 'Total Orders' FROM sales_flat_order o
# Time is in UTC
where o.created_at > '2018-10-25 07:00:00'
# This is the store view ID.
and o.store_id='123';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment