How Vantage Resolves Multiple Grouping Sets Specifications - Teradata VantageCloud Lake

Lake - Working with SQL

Deployment
VantageCloud
Edition
Lake
Product
Teradata VantageCloud Lake
Release Number
Published
February 2025
ft:locale
en-US
ft:lastEdition
2025-11-21
dita:mapPath
jbe1714339405530.ditamap
dita:ditavalPath
pny1626732985837.ditaval
dita:id
jbe1714339405530
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))