Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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 - last 3 hours
- WHERE o.created_at > DATE_SUB(NOW(), INTERVAL 3 HOUR)
- AND o.created_at < NOW()
- AND o.store_id='1374'
- GROUP BY HOUR(o.created_at),MINUTE(o.created_at)
- ORDER BY o.created_at ASC;
Add Comment
Please, Sign In to add comment