Last active
July 19, 2018 20:50
-
-
Save CajuCLC/d7f16198dd919932ff301f966c8d6d76 to your computer and use it in GitHub Desktop.
magento-orders_per_minute.sql
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 | |
# Change the interval based on UTC to show on specific timezone | |
date_format(date_sub(o.created_at, interval 7 hour), "%l:%i %p") `Time in PST`, | |
count(*) OPM | |
from sales_flat_order o | |
# Time from the DB | |
where o.created_at > '2018-07-16 16:00:00' | |
and o.created_at < '2018-07-16 19:00:00' | |
# Inform store ID below or remove for all stores | |
and o.store_id='1374' | |
group by hour(o.created_at),minute(o.created_at) | |
order by o.created_at ASC; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment