queries:functions:cumulate

cumulate

WARNING: This feature is not yet available and will be part of DuckProve BETA.

The cumulate function does the same as the sum function, but is no aggregation function. This allows cumulative representations of data.

Return Type Number
Aggregates No
Flags Cumulation

Parameters

Parameters: cumulate(value)

Name Type Description
value Number The numbers which will be cumulated together.

Demonstration

Demo 1

Considering the following values:

1,2,3,4,5

After applying the cumulate function the result set would consist of the following values:

1,3,6,10,15

Where this is calculated like this:

1,3 (2+1),6 (3+3),10 (6+4),15 (10+5)

Demo 2

Considering the following values:

1,1,1,1,1

After applying the cumulate function the result set would consist of the following values:

1,2,3,4,5

Where this is calculated like this:

1,2 (1+1),3 (2+1),4 (3+1),5 (4+1)