I hereby claim:
- I am acousticrand on github.
- I am rthacker (https://keybase.io/rthacker) on keybase.
- I have a public key ASCCsGMWkQPUGD0-qUQCZbcMDSyfSxsJUpAYT5h0-9gN0wo
To claim this, I am signing this object:
SET @end_time = utc_timestamp(), @start_time = '2017-03-14 15:00:00'; -- specific start time | |
-- SET @end_time = utc_timestamp(), @start_time = date_sub(@end_time, INTERVAL '02:30' HOUR_MINUTE); -- interval start time last 2.5 hours | |
SELECT | |
COUNT(id) AS OrdersPer | |
-- , DATE_FORMAT(CONVERT_TZ(OrderDate, 'UTC', 'EST'), "%Y-%m-%d %H:%i:%s") AS time_buckets -- Use this one for ORDERS PER SECOND | |
, DATE_FORMAT(CONVERT_TZ(OrderDate, 'UTC', 'EST'), "%Y-%m-%d %H:%i") AS time_buckets -- Use this one for ORDERS PER MINUTE | |
-- , DATE_FORMAT(CONVERT_TZ(OrderDate, 'UTC', 'EST'), "%Y-%m-%d %H") AS time_buckets -- Use this one for ORDERS PER HOUR | |
-- , DATE_FORMAT(CONVERT_TZ(OrderDate, 'UTC', 'EST'), "%Y-%m-%d") AS time_buckets -- Use this one for ORDERS PER DAY | |
-- , now() -- if you would like to see the timezone of now in the DB server's TZ (likely UTC) for comparison |
I hereby claim:
To claim this, I am signing this object: