Here is how to use cumulate() function.
Description:
Compute sum of members of a sequence.
Syntax:
Note:
The function computes sum of members of sequence A.
Parameter:
A |
A sequence |
Return value:
Sequence
Example:
|
A |
|
1 |
=[1,2,3,4] |
|
2 |
=A1.cumulate() |
Return【1,3,6,10】. |
3 |
=connect("demo").query("select EID,NAME,SALARY,DEPT from employee") |
|
4 |
=A3.group(DEPT;sum(SALARY):TolSalary) |
Compute sum of salaries in each department of table sequence A3.
|
5 |
=A4.(TolSalary).cumulate() |
Compute sum of values of TolSalary column in sequence A4.
|