SUM(numeric_expression ) - Advanced SQL Engine - Teradata Database

SQL Data Definition Language Syntax and Examples

Product
Advanced SQL Engine
Teradata Database
Release Number
17.00
Published
September 2020
Language
English (United States)
Last Update
2021-01-23
dita:mapPath
wgr1555383704548.ditamap
dita:ditavalPath
lze1555437562152.ditaval
dita:id
B035-1144
lifecycle
previous
Product Category
Teradata Vantage™

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, Vantage 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, Vantage 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.