apoc.coll.sumLongs

Details

Syntax

apoc.coll.sumLongs(coll)

Description

Returns the sum of all the INTEGER | FLOAT in the LIST<INTEGER | FLOAT>.

Arguments

Name

Type

Description

coll

LIST<INTEGER | FLOAT>

The list of numbers to create a sum from after each is cast to a java Long value.

Returns

INTEGER

Usage examples

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

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

15