PERCENTILE_CONT#

Calculates a percentile based on a continuous distribution of the column value. The result is interpolated and might not be equal to any of the specific values in the column.

Syntax#

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

Arguments#

numeric_literal

The percentile to compute. The value must range between 0.0 and 1.0.

Return types#

float

Example#

SELECT PERCENTILE_CONT(0.5) WITHIN GROUP (ORDER BY [IntColumn]) OVER() AS [ReturnValuePercentileCont]
  FROM [IntTable]

See Also#