SQL Flow Field Guide

PERCENTILE_CONT

Catalog support for SQL Server 2022 (16.x) and 2025 (17.x)

inverse distribution (window)

What changes

Input
ordered values (WITHIN GROUP) within an OVER partition
Output or change
interpolated percentile per row
Return type
float(53)

Syntax at a glance

PERCENTILE_CONT ( numeric_literal ) WITHIN GROUP ( ORDER BY order_by_expression [ ASC | DESC ] OVER ( [ <partition_by_clause> ] )

Work example

Estimate a continuous percentile that can interpolate between observed values.

Test a tie, partition boundary, and one-row partition. State the order and frame in the query.

Check your work The result might not occur in the input and the percentile argument must be from zero to one.

Open Microsoft Learn for full syntax, permissions, and details for your version.