apoc.coll.max

Details

Syntax

apoc.coll.max(values)

Description

Returns the maximum of all values in the given LIST<ANY>.

Arguments

Name

Type

Description

values

LIST<ANY>

The list to find the maximum in.

Returns

ANY

This function is not considered safe to run from multiple threads. It is therefore not supported by the parallel runtime (introduced in Neo4j 5.13). For more information, see the Cypher Manual → Parallel runtime.

Usage examples

The following computes the maximum of values in a list:

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

5