Skip to content
Legacy docs for Tenzir v5.x. For the latest Tenzir v6 series, visit docs.tenzir.com. Migrating from v5? Read the Tenzir v6 migration guide.

Computes the specified quantile of all grouped values.

quantile(xs:list, q=float) -> float

The quantile function returns the quantile of all numeric values in xs, specified by the argument q, which should be a value between 0 and 1.

The values to evaluate.

The quantile to compute, where q=0.5 represents the median.

Compute the 0.5 quantile (median) of values

Section titled “Compute the 0.5 quantile (median) of values”
from {x: 1}, {x: 2}, {x: 3}, {x: 4}
summarize median_value=quantile(x, q=0.5)
{median_value: 2.5}

Last updated: