Previous Topic Next topic Print topic


SUM

ANSI DB2 SQL/DS XDB
X X X X

Adds up all the values in each group of a column. Null values will be ignored. The format appears below:

SUM([DISTINCT] x)

where the parameter x is a numeric field or expression, and the keyword DISTINCT is used to filter out duplicate values prior to summing. Note that DISTINCT can be used with either a column name or an expression.

Previous Topic Next topic Print topic