v.19.3New Features
Added Function Tostartoftenminutes()
Added function toStartOfTenMinutes(). #4298 (Vitaly Baranov)Why it matters
This function simplifies time bucketing by 10-minute intervals, enabling easier aggregation and analysis of data grouped by fixed 10-minute blocks, which is useful for time series analysis and data summarization in ClickHouse.How to use it
Use thetoStartOfTenMinutes() function by passing a DateTime or DateTime64 value as the argument. It returns a timestamp rounded down to the closest previous 10-minute mark. For example:SELECT toStartOfTenMinutes(event_time) FROM table