I have the follwoing table structure
| start | count |
|---|---|
| 2022-08-02 22:13:35 | 20 |
| 2022-08-03 04:27:20 | 10 |
| 2022-08-03 09:21:48 | 10 |
| 2022-08-03 14:25:48 | 10 |
| 2022-08-03 14:35:07 | 10 |
| 2022-08-03 15:16:09 | 10 |
| 2022-08-04 07:09:07 | 20 |
| 2022-08-04 10:35:45 | 10 |
| 2022-08-04 14:42:49 | 10 |
I want to group the start column into 3 hour intervals and sum the count
like follows
| interval | count |
|---|---|
| 01h-03h | 400 |
| 03h-06h | 78 |
| ... | ... |
| ... | .... |
| 20h-23h | 100 |
| 23h-01h | 64 |
I have the following query but am not sure how to proceed from here
select hour(start), sum(count) from `table`
GROUP BY hour(start)