17.05 - GROUP BY grouping_or_ordering_specification - Advanced SQL Engine - Teradata Database

Teradata Vantage™ - SQL Data Definition Language Syntax and Examples

Product
Advanced SQL Engine
Teradata Database
Release Number
17.05
Release Date
January 2021
Content Type
Programming Reference
Publication ID
B035-1144-175K
Language
English (United States)

Group aggregate index rows on the AMPs.
You cannot specify a GROUP BY clause in the definition of a column-partitioned join index.

For a detailed description of the GROUP BY clause, see Teradata Vantage™ - SQL Data Manipulation Language, B035-1146.


column_name

The name of the column or columns within the join index definition select list used to group aggregate index rows on the AMPs.
The GROUP BY column list must include all the non-aggregated columns for an aggregate join index.

column_position

The ordinal position of the column or columns within the join index definition select list used to group aggregate index rows on the AMPs.
If you specify the system-derived ROWID column in the GROUP BY column list, it must have been previously aliased with a column name alias. You cannot specify the literal ROWID as part of the column list for the GROUP BY option of a join index definition.
If you specify a GROUP BY clause, but do not specify a COUNT or SUM operator, the system adds a COUNT(*) expression, named CountStar, to the column list.

column_alias

An alias for the column or columns.

expression_alias

An alias for the expression.