GROUPING Function | Teradata Vantage - GROUPING - Advanced SQL Engine - Teradata Database

SQL Functions, Expressions, and Predicates

Product
Advanced SQL Engine
Teradata Database
Release Number
17.05
17.00
Published
June 2020
Language
English (United States)
Last Update
2021-01-30
dita:mapPath
tpt1555966086716.ditamap
dita:ditavalPath
lze1555437562152.ditaval
dita:id
B035-1145
lifecycle
previous
Product Category
Teradata Vantage™

Returns a value that indicates whether a specified column in the result row was excluded from the grouping set of a GROUP BY clause.

IF the value of the specified column in the result row is … THEN GROUPING returns …
a NULL generated when the extended grouping specification aggregated over the column and excluded it from the particular grouping 1
anything else 0