PERCENTILE_DISC

Applies to: ✅ Data 360 SQL ✅ Tableau Hyper API

Computes a discrete percentile, returning the first input value whose position in the ordering equals or exceeds the specified fraction.

  • <fraction>: A double precision value between 0 and 1 specifying the percentile to compute.
  • <sort_expression>: An expression of any sortable type.

Returns the same type as the sort expression. Returns NULL if the fraction is NULL.

  • This is an ordered-set aggregate function.
  • NULL values in the sorted input are ignored.
  • Returns an actual value from the input set (no interpolation).
  • Use PERCENTILE_CONT for continuous percentiles with interpolation.

Find the median (50th percentile).

Find the 25th and 75th percentiles.

Calculate percentiles for each group.