sum()

Aggregate. Returns the total value of the specified expression for each group of rows.

Syntax

sum ( expression )

Parameters

expression

The object that is summed. The expression accepts all datatypes except boolean.

Usage

Typically, sum is performed on a column. The function returns the same datatype as the expression. The sum function uses all of the specified values and totals their values.

The sum function could be used to find the combined annual sales in order to assess long term and short term goals. By looking at the larger picture, the process of planning is simplified.