CUBE Option Syntax | SQL SELECT Statements | VantageCloud Lake - CUBE Option Syntax - 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
CUBE { ordinary_grouping_set | (ordinary_grouping_set) }

Syntax Elements

ordinary_grouping_set
One or more expressions used to group cubed report rows across multiple dimensions.
All ordinary grouping sets must make explicit column references. You cannot specify column positions with CUBE.
You cannot specify more than 8 columns in the ordinary grouping sets.
This limit is on the number of table dimensions that can be cubed. The value is much smaller than the limits for the ROLLUP and GROUPING SETS options because this value specifies a limit of 28, or 256 different combinations of columns, not only columns.
To reference a column that has a LOB data type, do one of the following:
  • Cast the LOB to a non-LOB type (for example, cast BLOB to BYTE or VARBYTE, cast CLOB to CHARACTER or VARCHAR)
  • Pass the LOB to a function whose result is not a LOB.