Hello,
I couldn't find exactly this question among the great date/time posts on the forum.
I have a date field (row_added_ts) with the format: "12/29/2014 6:34:42 PM"
My end goal is to group 'cases' by the hour, but with the date included (so a simple HOUR EXTRACT seemingly won't work).
e.g:
--
SELECT row_added_ts original_time,
count(distinct case_id) cases
FROM X.data
GROUP BY 1
--
But I would like the grouping to be by hour (not rounded).
So 1:00:00 PM - 1:59:59 PM would be grouped 1:00 PM, 2:00:00 PM - 2:59:59 PM would be grouped 2:00 PM, so forth.
Any help is appreciated.
Forums: