PERCENTILE Function Syntax | Teradata Vantage - PERCENTILE Syntax - Advanced SQL Engine - Teradata Database

Time Series Tables and Operations

Product
Advanced SQL Engine
Teradata Database
Release Number
17.05
17.00
Published
June 2020
Language
English (United States)
Last Update
2021-01-22
dita:mapPath
cxa1555383531762.ditamap
dita:ditavalPath
lze1555437562152.ditaval
dita:id
B035-1208
lifecycle
previous
Product Category
Teradata Vantageā„¢
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.