This function is only available when connected to a Teradata database.
Given a value expression, typically involving one or more columns, and a sort expression list, the Percentile function computes the value or interpolation of a value such that a given percentage of rows have a value less than or equal to that value. The rows considered are either all the rows in the query or just the rows in a group defined by a GROUP BY clause. There are actually two different Percentile functions, PERCENTILE_CONT, which returns an interpolated or “continuous” value, and PERCENTILE_DISC, which returns a “discontinuous” value that occurs in the data set.
Percentile is an aggregate function with NULL values ignored. Note that Median is a special case of PERCENTILE_CONT with an argument value of 0.5.
When dragging a Percentile function into a variable, the following tree element is created.
Double-click on Percentile, or highlight it and click Properties to set the properties for this function.
By selecting Continuous (the default value), a PERCENTILE_CONT function is requested. By selecting Discontinuous, a PERCENTILE_DISC function is requested.