ARRAY_MAX
Returns the maximum value of the given input array.
Syntax
ARRAY_MAX(X)
Arguments
X
Type: array
An array of any comparable value type.
Returns
Type: same as input
The maximum value within X.
Examples
| X | Output |
|---|---|
[1,2,3,1,2,3]
|
3 |
[1,1,1,1,1,1,1,1]
|
1 |
[0,1,0,1,0,1]
|
1 |
[NULL,1,0,1,0,1]
|
NULL
|
[NULL]
|
NULL
|
[a,b,a,c,c,c]
|
c |
[a,b,c,z]
|
z |