I am trying to count events that happen in a day, which in itself is easy:
SELECT date(time),COUNT(DISTINCT comment)
FROM data
GROUP BY date(time)
But I need a day end to be set at 4pm. So all comments before 4pm is day N, and news after 4pm are day N+1. This isnt a global thing, so I’d rather not change time zone of entire program and etc. Maybe I can somehow apply timezone to this query or pad time?
1 Answer