Aggregates Aggregate

quantile()

Returns the exact quantile number between 0 and 1 . If pos is a LIST of FLOATs, then the result is a LIST of the corresponding exact quantiles.

Alias of quantile_disc()

Arguments & returns

3 overloads

quantile(x)

Aggregate
Overload link x Returns
#01 ANY ANY

quantile(x, pos)

Aggregate
Overload link xpos Returns
#02 ANYDOUBLE ANY
#03 ANYDOUBLE[] ANY

Example

quantile example
SQL
Haybarn WASM 1.5.5-rc3 · In your browser

Engine example with sample data · Run to view results.

In other engines

Apache Hivepercentile()

PERCENTILE(x, 0.5)
In Haybarn
QUANTILE(x, 0.5)

SQLGlot example ↗