ARRAY_CUMULATIVE_SUM
Reference material for ARRAY_CUMULATIVE_SUM function ( cumulative )
Returns an array of partial sums of elements from the source array (a cumulative sum). If the parameter <function>
is provided, the values of the array elements are converted by this function before summing.
Syntax
Parameter | Description | Supported input types |
---|---|---|
<function> | The function used to convert the array members. | Any function that can convert an array |
<array> | The array used for the sum calculations. | Any array of numeric values |
Return Type
ARRAY
of the same type as the input array (must be numeric)
Example
The following example adds 1
to each level in the levels
array:
Returns: 2,5,9,19