16.20 - Meaning of Rank - Advanced SQL Engine - Teradata Database

Teradata Vantage™ - SQL Functions, Expressions, and Predicates

Product
Advanced SQL Engine
Teradata Database
Release Number
16.20
Published
March 2019
Language
English (United States)
Last Update
2020-03-25
dita:mapPath
xzf1512079057909.ditamap
dita:ditavalPath
TD_DBS_16_20_Update1.ditaval
dita:id
kby1472250656485

RANK returns an ordered ranking of rows based on the value_expression in the ORDER BY clause. All rows having the same value_expression value are assigned the same rank.

If n rows have the same value_expression values, then they are assigned the same rank, call it rank r. The next distinct value receives rank r +n. And so on.

Less formally, RANK sorts a result set and identifies the numeric rank of each row in the result. RANK returns an integer that represents the rank of each row in the result.