Event distribution by hour of day (ClickHouse)
Event distribution by hour of day (ClickHouse)
Extract the hour of day from ts with toHour (an integer 0..23, no date) and, for each hour of day, count the number of events across the whole events table. Return columns hour_of_day and events. Order by hour_of_day ascending.
Expected output sample
| hour_of_day | events |
|---|---|
| 8 | 2 |
| 9 | 5 |
| 10 | 2 |
Sign in to see submission history
Sign inSign in to use AI Mentor
Sign inFocus radio
Paused · SomaFM · Fluid