GROUP BY and Built-in Ordered Analytic Functions - 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

For built-in ordered analytic functions specific to Vantage, such as CSUM and MAVG, GROUP BY determines the partitions over which the function runs. For an example, see Example: Specifying GROUP BY Using an Ordered Analytic Function.

For window functions, such as SUM and AVG, GROUP BY collapses all rows with the same value for the group-by columns into a single row. The GROUP BY clause must include all the columns specified in the:
  • Select list of the SELECT clause
  • Window functions in the select list of a SELECT clause
  • Window functions in the search condition of a QUALIFY clause
  • The condition in a RESET WHEN clause

For examples and more information on GROUP BY and ordered analytical functions, see Ordered Analytical Functions.