16.20 - Nested Aggregation - Teradata Database - Teradata Vantage NewSQL Engine

Teradata Vantageā„¢ Time Series Tables and Operations

Product
Teradata Database
Teradata Vantage NewSQL Engine
Release Number
16.20
Published
March 2019
Language
English (United States)
Last Update
2019-05-02
dita:mapPath
wne1515028094879.ditamap
dita:ditavalPath
TD_DBS_16_20_Update1.ditaval

Direct nesting of aggregates is not supported in Teradata Database, such as SELECT AVG(AVG(column))...). However, nested aggregates can be evaluated using a derived table which contains the aggregates to be nested. This is supported by both the GROUP BY TIME clause and the GROUP BY clause. The following examples show this for the GROUP BY TIME clause.