apoc.coll.max
Syntax |
|
||
Description |
Returns the maximum of all values in the given |
||
Arguments |
Name |
Type |
Description |
|
|
The list to find the maximum in. |
|
Returns |
|
This function is not considered safe to run from multiple threads. It is therefore not supported by the parallel runtime. For more information, see the Cypher Manual → Parallel runtime. |
Usage examples
The following examples computes the maximum of values in a list using both APOC and Cypher:
apoc.coll.max
WITH [1,2,3,4,5] AS x
RETURN apoc.coll.max(x) AS output
Cypher’s UNWIND and max()
UNWIND [1,2,3,4,5] AS x
RETURN max(x) AS output
As a Cypher expression
RETURN head( COLLECT { UNWIND [1,2,3,4,5] AS x RETURN max(x) }) AS output
Output |
---|
5 |