apoc.coll.min
Syntax |
|
||
Description |
Returns the minimum of all values in the given |
||
Arguments |
Name |
Type |
Description |
|
|
The list to find the minimum 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 compute the minimum of values in a list using both APOC and Cypher:
apoc.coll.min
RETURN apoc.coll.min([1,2,3,4,5]) AS output;
Cypher’s UNWIND and min()
UNWIND [1,2,3,4,5] AS x
RETURN min(x) AS output;
As a Cypher expression
RETURN head( COLLECT { UNWIND [1,2,3,4,5] AS x RETURN min(x) }) AS output
Output |
---|
1 |