16.20 - SUM(numeric_expression ) - Teradata Database - Teradata Vantage NewSQL Engine

Teradata Vantage™ SQL Data Definition Language Syntax and Examples

Teradata Database
Teradata Vantage NewSQL Engine
Release Number
March 2019
Content Type
Programming Reference
Publication ID
English (United States)
Last Update

The SUM aggregate function to compute the sum of the column or column expression with a numeric data type, specified by numeric_expression.

You cannot specify a SUM function in the definition of a column-partitioned join index.

The data type for any column defined by a SUM function must be typed as FLOAT to avoid numeric overflow.

If you do not assign a data type to a SUM column, Teradata Database types it as FLOAT automatically. If you assign a type other than FLOAT, the system returns an error to the requestor.

SUM DISTINCT is not permitted.

Each aggregate join index must be created with a COUNT(*) or a COUNT(value_expression ). If you do not specify this expression, Teradata Database adds a COUNT(*) to the definition to support index maintenance.

For more information about the SUM aggregate function, see Teradata Vantage™ SQL Functions, Expressions, and Predicates, B035-1145.