The SUM() function eliminates the lowest level of a dynamic array by adding the elements to form an item of the next highest level.
The SUM() function identifies the lowest level elements present in expr and forms the sum of each group of elements at this level, replacing the group with an item of the next highest level.
In a numeric array containing subvalues, the subvalues are summed to form values.
If there are no subvalues and the numeric array contains values, the values are summed to form fields.
If there are no subvalues or values, the fields are summed to form a single field.
If only one item remains, the SUM() function returns expr.
Non-numeric elements of expr are ignored.
TOTAL.PAID = SUM(PAYMENTS)
This statement sums a multivalued list of payments to form the total amount paid.