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
Release Date
March 2019
Content Type
Programming Reference
Publication ID
B035-1208-162K
Language
English (United States)

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.