ROLLUP Option | SQL SELECT Statements | VantageCloud Lake - ROLLUP Option - Teradata Vantage

Teradata® VantageCloud Lake

Deployment
VantageCloud
Edition
Lake
Product
Teradata Vantage
Published
January 2023
ft:locale
en-US
ft:lastEdition
2024-12-11
dita:mapPath
phg1621910019905.ditamap
dita:ditavalPath
pny1626732985837.ditaval
dita:id
phg1621910019905

Analyzes a set of data across a single dimension with more than one level of detail.

ANSI Compliance

ROLLUP is ANSI SQL:2011 compliant.

SAMPLE Clause and ROLLUP

You cannot specify a SAMPLE clause in a query that also specifies the ROLLUP option in a GROUP BY clause, with the exception of a query where the ROLLUP option in the GROUP BY clause is specified in a derived table or a view, and the SAMPLE clause is specified in the outer query.

How ROLLUP Summarizes Data

Given n column references, ROLLUP groups data at n levels of detail in one dimension. For example, in Example: Basic ROLLUP, the GROUP BY clause rolls up over three columns and reports three levels of control breaks.