Nested Aggregation | Teradata Vantage - Nested Aggregation - Advanced SQL Engine - Teradata Database

Time Series Tables and Operations

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Published
July 2021
Language
English (United States)
Last Update
2021-07-28
dita:mapPath
zzg1600277315070.ditamap
dita:ditavalPath
zzg1600277315070.ditaval
dita:id
B035-1208
lifecycle
previous
Product Category
Teradata Vantageā„¢

Direct nesting of aggregates is not supported in Vantage, such as SELECT AVG(AVG(column))...). However, nested aggregates can be evaluated using a derived table that 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.