apoc.coll.sum

Details

Syntax

apoc.coll.sum(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.

Returns

FLOAT

Usage examples

The following computes the sum of values in a list:

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

15.0