Skip to main content

PQL46 (PQL Function Library - CPM 4.6)

SUM

Applies to: CELONIS 4.0 CELONIS 4.2 CELONIS 4.3 CELONIS 4.4 CELONIS 4.5 CELONIS 4.6

Description

SUM calculates the sum over an INT or FLOAT column.

The data type of the result is the same as the input column data type. So the sum of an INT column will be of type INT .

Syntax
SUM ( table.column )
NULL handling

NULL values are ignored, meaning that they do not influence the result. If all values of a group are NULL, the result for this group is also NULL.

Tips

If the size of the source column greatly exceeds the number of aggregated groups, the sum for each group will be executed in parallel. Therefore, to achieve a good performance, multiple CPU cores and balanced aggregation (as described) are preferable. (Since: CELONIS 4.3)

Example

[1] Sum of small integers.

Query

Column1

SUM ( "Table1"."Column1" )

Input

Output

Table1

Column1 : INT

Column2 : INT

1

2

3

4

Result

Column1 : INT

4

See also: