GROUP BY grouping_or_ordering_specification - Advanced SQL Engine - Teradata Database

SQL Data Definition Language Syntax and Examples

Product
Advanced SQL Engine
Teradata Database
Release Number
17.05
Published
January 2021
Language
English (United States)
Last Update
2021-01-22
dita:mapPath
ncd1596241368722.ditamap
dita:ditavalPath
hoy1596145193032.ditaval
dita:id
B035-1144
lifecycle
previous
Product Category
Teradata Vantage™

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.