SUM(numeric_expression ) - Teradata Database

SQL Data Definition Language Syntax and Examples

Deployment
VantageCloud
VantageCore
Edition
VMware
Enterprise
IntelliFlex
Product
Teradata Database
Release Number
20.00
Published
June 2025
ft:locale
en-US
ft:lastEdition
2026-09-23
dita:mapPath
mbm1747160743883.ditamap
dita:ditavalPath
jlp1749501702948.ditaval
dita:id
mdr1472255012272
lifecycle
latest

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, the system 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, the system adds a COUNT(*) to the definition to support index maintenance.

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