apoc.coll.sumLongs

Function

apoc.coll.sumLongs(coll LIST<INTEGER \| FLOAT>) - returns the sum of all the INTEGER \| FLOAT in the LIST<INTEGER \| FLOAT>.

Signature

apoc.coll.sumLongs(numbers :: LIST<INTEGER \| FLOAT>) :: INTEGER

Input parameters

Name Type Default

numbers

LIST<INTEGER | FLOAT>

null

Usage examples

The following computes the sum of numeric values in a list:

RETURN apoc.coll.sumLongs([1,2,3,4,5]) AS output;
Table 1. Results
Output

15