PERCENTILE Function Syntax | Teradata Vantage - 17.00 - PERCENTILE Syntax - Teradata Database

Teradata Vantageā„¢ - Time Series Tables and Operations

prodname
Advanced SQL Engine
Teradata Database
vrm_release
17.00
created_date
June 2020
category
Programming Reference
featnum
B035-1208-170K
PERCENTILE (
  [ DISTINCT | ALL ] 'value_expression',
  percentile
  [, { LINEAR | LOW | HIGH | NEAREST | MIDPOINT } ]
)

Syntax Elements

ALL
All non-null value_expressions, including duplicates, in the computation.
DISTINCT
Excludes duplicates specified by value_expression from the computation.
value_expression
A literal or column expression for which a set of aggregate functions are computed for the series.

The value_expression cannot be a reference to a view column derived from a function, and cannot contain any ordered analytical or aggregate functions.

percentile
A Teradata literal float value that represents the desired percentile.
LINEAR

Use linear interpolation to interpolate the result value when the desired result lies between two data points.

This parameter is not case-sensitive.

LOW

Use a low value interpolation scheme to interpolate the result value when the desired result lies between two data points.

This parameter is not case-sensitive.

HIGH
Use a high value interpolation scheme to interpolate the result value when the desired result lies between two data points.
This parameter is not case-sensitive.
NEAREST
Use a nearest value interpolation scheme to interpolate the result value when the desired result lies between two data points.
This parameter is not case-sensitive.
MIDPOINT
Use a midpoint interpolation scheme to interpolate the result value when the desired result lies between two data points.
This parameter is not case-sensitive.