apoc.coll.avg

Function

apoc.coll.avg(coll LIST<INTEGER \| FLOAT>) - returns the average of the numbers in the LIST<INTEGER \| FLOAT>.

Signature

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

Input parameters

Name Type Default

numbers

LIST<INTEGER | FLOAT>

null

Usage examples

The following computes the average of values in a list:

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

3.0