apoc.coll.sumLongs

Function

apoc.coll.sumLongs(coll [Number]) - returns the sum of all the numbers in the list.

Signature

apoc.coll.sumLongs(numbers :: LIST? OF NUMBER?) :: (INTEGER?)

Input parameters

Name Type Default

numbers

LIST? OF NUMBER?

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