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_dayevents
82
95
102
PostgreSQLv16

Your query result will appear here

Focus radio
Paused · SomaFM · Fluid