quantileTimingWeighted
The result is deterministic (it doesn’t depend on the query processing order). The function is optimized for working with sequences which describe distributions like loading web pages times or backend response times.
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
Alias: medianTimingWeighted
.
Parameters
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 .
Accuracy
The calculation is accurate if:
- Total number of values doesn’t exceed 5670.
- Total number of values exceeds 5670, but the page loading time is less than 1024ms.
Otherwise, the result of the calculation is rounded to the nearest multiple of 16 ms.
Note
For calculating page loading time quantiles, this function is more effective and accurate than quantile.
Type: Float32
.
Note
If no values are passed to the function (when using ), is returned. The purpose of this is to differentiate these cases from cases that result in zero. See ORDER BY clause for notes on sorting NaN
values.
Example
Input table:
Query:
See Also