Skip to content
ClickHouse Docs

quantilesExactHigh

Autogenerated from ClickHouse system tables

Introduced in: v20.8.0

Exactly computes multiple quantiles of a numeric data sequence at different levels simultaneously. For an even number of elements at level 0.5 it returns the higher of the two middle values.

This function is equivalent to quantileExactHigh but allows computing multiple quantile levels in a single pass, which is more efficient than calling individual quantile functions.

Syntax

quantilesExactHigh(level1, level2, ...)(expr)

Arguments

Returned value

Array of quantiles of the specified levels in the same order as the levels were specified. For numeric data types the output format matches the input format. Array((U)Int*) or Array(Float*) or Array(Decimal*) or Array(Date) or Array(DateTime) or Array(DateTime64)

Examples

Computing multiple exact high quantiles

SELECT quantilesExactHigh(0.25, 0.5, 0.75)(number) FROM numbers(10)
┌─quantilesExactHigh(0.25, 0.5, 0.75)(number)─┐
│ [2,5,7]                                     │
└─────────────────────────────────────────────┘