Aggregate Functions - Advanced SQL Engine - Teradata Database

Database Introduction

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Published
July 2021
Language
English (United States)
Last Update
2021-07-27
dita:mapPath
jiv1600056352873.ditamap
dita:ditavalPath
jiv1600056352873.ditaval
dita:id
B035-1091
lifecycle
previous
Product Category
Teradata Vantage™

Sometimes the information you want can only be derived from data in a set of rows, instead of individual rows.

Aggregate functions produce results from sets of relational data that you have grouped (optionally) using a GROUP BY or ORDER BY clause. Aggregate functions process each set and produce one result for each set.

The following table lists a few examples of aggregate functions.

The function… Returns the…
AVG arithmetic average of the values in a specified column.
COUNT number of qualified rows.
MAX maximum column value for the specified column.
MIN minimum column value for the specified column.
SUM arithmetic sum of a specified column.