quantile
This function applies reservoir sampling with a reservoir size up to 8192 and a random number generator for sampling. The result is non-deterministic. To get an exact quantile, use the function.
When using multiple functions with different levels in a query, the internal states are not combined (that is, the query works less efficiently than it could). In this case, use the quantiles function.
Syntax
Arguments
level
— Level of quantile. Optional parameter. Constant floating-point number from 0 to 1. We recommend using a value in the range of[0.01, 0.99]
. Default value: 0.5. Atlevel=0.5
the function calculates .- — Expression over the column values resulting in numeric data types, or DateTime.
Returned value
Type:
- for numeric data type input.
- Date if input values have the
Date
type.
Input table:
Query:
Result: