Aggregate Functions - Teradata Database

Database Introduction

Product
Teradata Database
Release Number
15.00
Language
English (United States)
Last Update
2018-09-25
dita:id
B035-1091
lifecycle
previous
Product Category
Teradata® Database

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.