APPROX_PERCENTILE_CONT
ordered-set approximate aggregate
What changes
- Input
- ordered values of each group (WITHIN GROUP)
- Output or change
- approximate interpolated percentile
- Return type
- float(53)
Syntax at a glance
APPROX_PERCENTILE_CONT (numeric_literal) WITHIN GROUP (ORDER BY order_by_expression [ASC|DESC])
Work example
Estimate a continuous percentile for a large group when approximate output is acceptable.
Compare with an exact percentile on a representative sample and document the tolerance.
Check your work The percentile is approximate and should not decide an exact policy threshold without review.
Open Microsoft Learn for full syntax, permissions, and details for your version.