How Vantage Resolves Multiple Grouping Sets Specifications - Teradata Vantage

Teradata® VantageCloud Lake

Deployment
VantageCloud
Edition
Lake
Product
Teradata Vantage
Published
January 2023
Language
English (United States)
Last Update
2024-04-03
dita:mapPath
phg1621910019905.ditamap
dita:ditavalPath
pny1626732985837.ditaval
dita:id
phg1621910019905
Vantage resolves multiple grouping sets specifications by concatenating pairwise the individual elements of the sets. For information about grouping sets specifications, see the following:

When applied to specifications that contain multiple grouping specification elements, the resolution can be complicated.

For example, the following two GROUP BY clauses are semantically identical:

GROUP BY GROUPING SETS ((A,B), (C)), GROUPING SETS ((X,Y),())
GROUP BY GROUPING SETS ((A,B,X,Y),(A,B),(C,X,Y),(C))