Guest User

Untitled

a guest
Jul 16th, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. select
  2. # Change the interval based on UTC to show on specific timezone
  3. date_format(date_sub(o.created_at, interval 7 hour), "%l:%i %p") `Time in PST`,
  4. count(*) OPM
  5. from sales_flat_order o
  6. # Time from the DB
  7. where o.created_at > '2018-07-16 16:00:00'
  8. and o.created_at < '2018-07-16 19:00:00'
  9. # Inform store ID below or remove for all stores
  10. and o.store_id='1374'
  11. group by hour(o.created_at),minute(o.created_at)
  12. order by o.created_at ASC;
Add Comment
Please, Sign In to add comment