approx_percentile_rank()
Estimate what percentile a given value would be located at in a UddSketch.
approx_percentile_rank(
value DOUBLE PRECISION,
sketch UddSketch
) RETURNS UddSketch
Required arguments
Name | Type | Description |
---|---|---|
value | DOUBLE PRECISION | The value to estimate the percentile of |
sketch | UddSketch | The sketch to compute the percentile on. |
Returns
Column | Type | Description |
---|---|---|
approx_percentile_rank | DOUBLE PRECISION | The estimated percentile associated with the provided value |
Sample usage
SELECT
approx_percentile_rank(99, percentile_agg(data))
FROM generate_series(0, 100) data;
approx_percentile_rank
----------------------------
0.9851485148514851
当前内容版权归 TimescaleDB 或其关联方所有,如需对内容或内容相关联开源项目进行关注与资助,请访问 TimescaleDB .