PERCENTILE_CONT/PERCENTILE_DISC Function Syntax | Teradata Vantage - 17.10 - PERCENTILE_CONT/PERCENTILE_DISC Function Syntax - Advanced SQL Engine - Teradata Database

Teradata Vantageā„¢ - SQL Functions, Expressions, and Predicates

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Release Date
July 2021
Content Type
Programming Reference
Publication ID
B035-1145-171K
Language
English (United States)
{ PERCENTILE_CONT | PERCENTILE_DISC } ( value_expression_1 )
  WITHIN GROUP ( ORDER BY value_spec [,...] )

Syntax Elements

value_expression_1
A numeric value between 0 and 1 inclusive.
WITHIN GROUP
The order in which the values in a group or partition are sorted.
ORDER BY
The order in which the values in a group or partition are sorted.
value_spec
value_expression_2 [ ASC | DESC ] [ NULLS { FIRST | LAST } ]
value_expression_2
A single expression that must be a numeric value.
ASC
Ascending sort order.
DESC
Descending sort order.
NULLS FIRST
NULL results are to be listed first.
NULLS LAST
NULL results are to be listed last.