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

SQL Functions, Expressions, and Predicates

Product
Advanced SQL Engine
Teradata Database
Release Number
17.05
17.00
Published
June 2020
Language
English (United States)
Last Update
2021-01-30
dita:mapPath
tpt1555966086716.ditamap
dita:ditavalPath
lze1555437562152.ditaval
dita:id
B035-1145
lifecycle
previous
Product Category
Teradata Vantageā„¢
QUANTILE ( quantile_literal, sort_spec [,...] )

Syntax Elements

quantile_literal
A positive integer literal used to define the number of quantile partitions to be used.
Quantile values range from 0 through (Q-1), where Q is the number of quantile partitions specified by quantile_literal.
sort_spec
sort_expression [ ASC | DESC ]
sort_expression
A literal or column expression or comma-separated list of literal or column expressions to be used to sort the values.
For each row in the group, QUANTILE returns an integer value that represents the quantile of the sort_expression value for that row relative to the sort_expression value for all the rows in the group.
ASC
Ascending sort order.
DESC
Descending sort order.