quantileDD
quantileDD
Introduced in: v24.1.0
Computes an approximate quantile of a sample with relative-error guarantees. It works by building a DD.
Syntax
Aliases: medianDD
Parameters
relative_accuracy— Relative accuracy of the quantile. Possible values are in the range from 0 to 1. The size of the sketch depends on the range of the data and the relative accuracy. The larger the range and the smaller the relative accuracy, the larger the sketch. The rough memory size of the sketch islog(max_value/min_value)/relative_accuracy. The recommended value is 0.001 or higher.Float*level— Optional. Level of quantile. Possible values are in the range from 0 to 1. Default value: 0.5.Float*
Arguments
expr— Expression over the column values resulting in numeric data types,DateorDateTime.(U)Int*orFloat*orDateorDateTime
Returned value
Approximate quantile of the specified level. For Date and DateTime inputs the output format matches the input format. Float64 or Date or DateTime
Examples
Computing quantile with DD sketch
See Also