ARRAY_MAX
Returns the maximum value of the given input array.
ARRAY_MAX(X)
Type:
array
An array of any comparable value type.
Type: same as input
The maximum value within
X
.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 |
CREATE JOB function_operator_example
ADD_MISSING_COLUMNS = true
AS INSERT INTO default_glue_catalog.upsolver_samples.orders_transformed_data MAP_COLUMNS_BY_NAME
SELECT
ARRAY_MAX(ARRAY[3, 4, 0, 2, -1]) AS max_example1,
ARRAY_MAX(ARRAY[true, false]) AS max_example2
FROM default_glue_catalog.upsolver_samples.orders_raw_data
WHERE time_filter()
GROUP BY shippinginfo_address_state
LIMIT 1;
max_example1 | max_example2 |
---|---|
4 | true |
Last modified 28d ago