I have a datetime columcolumn and I can easily run queries with a group by on my datetime column. However, I would like to run group queries for minute intervals, two minute intervals, 5 minute intervals, hour intervals etc.
- 1-minute intervals
- 2-minute intervals
- 5-minute intervals
- 1 hour intervals
- etc.
How do I do this? Thanks.