GROUP BY grouping_or_ordering_specification - 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

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 GROUP BY Clause.


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.