You can define percentile aggregates using ClickHouse’s native functions without needing number_agg
. For example, to model the 90th percentile of a latency_ms
field, use:
- name: latency_p90_ms
type: number
sql: quantile(0.9)(latency_ms)
This works directly with the number
type and supports custom window functions like percentiles.