↑↓ select↵ open⌫ change scopeOpen full search

PG.CENTER connects PostgreSQL documentation, reference, and ecosystem knowledge. Maintained by Pigsty.

Wiki / Functions

percentile_cont

Computes the continuous percentile, a value corresponding to the specified fraction within the ordered set of aggregated argument values. This will interpolate between adjacent input items if needed.

English manual coverage begins with PostgreSQL 7.1. Source history and runtime observations have their own recorded version boundaries.

Reading PG 18·Select a recorded version

group
aggregate
group label
聚合函数
lang
en
layout
table-new
pages
functions-aggregate.html
prose only
false

Definition PG 18

Computes the continuous percentile, a value corresponding to the specified fraction within the ordered set of aggregated argument values. This will interpolate between adjacent input items if needed.

Signatures and overloads

percentile_cont ( fraction double precision ) WITHIN GROUP ( ORDER BY double precision ) → double precision → double precision
Computes the continuous percentile, a value corresponding to the specified fraction within the ordered set of aggregated argument values. This will interpolate between adjacent input items if needed.
percentile_cont ( fraction double precision ) WITHIN GROUP ( ORDER BY interval ) → interval → interval
Computes the continuous percentile, a value corresponding to the specified fraction within the ordered set of aggregated argument values. This will interpolate between adjacent input items if needed.
percentile_cont ( fractions double precision[] ) WITHIN GROUP ( ORDER BY double precision ) → double precision[] → double precision[]
Computes multiple continuous percentiles. The result is an array of the same dimensions as the fractions parameter, with each non-null element replaced by the (possibly interpolated) value corresponding to that percentile.
percentile_cont ( fractions double precision[] ) WITHIN GROUP ( ORDER BY interval ) → interval[] → interval[]
Computes multiple continuous percentiles. The result is an array of the same dimensions as the fractions parameter, with each non-null element replaced by the (possibly interpolated) value corresponding to that percentile.

Compare versions

Complete source facts

documentation revision

{"inputs":[{"file":"functions-aggregate.html","kind":"same-version-reviewed-manual","locale":"en","sha256":"31d3dcd36ef353484b4b3535f9f0d1cc239c3910146257fe5178f99b90b501e2","version":"18.7"},{"file":"functions-aggregate.html","kind":"same-version-reviewed-manual","locale":"zh-Hans","sha256":"0bf7506d27b71666fc74840a21a8f77c8a92735174f1d05033865961722e457c","version":"18.7"}],"release":"18.7","runtime_remeasured":false,"source_revision":"pgdoc:b9f0e7232f60f380d642ac9b99226606c254b552"}

Source references

Full definition and evidence JSON

Definition sources

center · PostgreSQL 18 · wiki-repair-20261023:ecb55a6a7b5220a1dc7f64cbcb981fefb462dc2dbfe101115b0d6d034ead6abd

Text language: en · wiki-repair-20261023:ecb55a6a7b5220a1dc7f64cbcb981fefb462dc2dbfe101115b0d6d034ead6abd