Ordered Analytical Functions - Advanced SQL Engine - Teradata Database

Database Introduction

Product
Advanced SQL Engine
Teradata Database
Release Number
17.05
17.00
Published
June 2020
Language
English (United States)
Last Update
2021-01-23
dita:mapPath
qia1556235689628.ditamap
dita:ditavalPath
lze1555437562152.ditaval
dita:id
B035-1091
lifecycle
previous
Product Category
Teradata Vantage™

Ordered analytical functions work over a range of data for a particular set of rows in some specific order to produce a result for each row in the set.

Like aggregate functions, ordered analytical functions are called for each item in a set. But unlike an aggregate function, an ordered analytical function produces a result for each detail item.

Ordered analytical functions allow you to perform sophisticated data mining on the information in your databases to get the answers to questions that SQL otherwise cannot provide.

The following table lists two examples of ordered analytical functions.

The following function… Returns the…
AVG arithmetic average of all values in the specified expression for each row in the group. The OVER() phrase must be specified to make AVG an ordered analytical function.
RANK ordered ranking of rows based on the value of the column being ranked.