Details
-
New Feature
-
Status: Closed
-
Major
-
Resolution: Implemented
-
1.18.0
Description
Find the minimum among all elements in the array for which ordering is supported.
Syntax:
array_min(array)
Arguments:
array: An ARRAY to be handled.
Returns:
The result matches the type of the elements. NULL elements are skipped. If array is empty, or contains only NULL elements, NULL is returned.
Examples:
SELECT array_min(array(1, 20, NULL, 3)); -- 1
See also
spark https://spark.apache.org/docs/latest/api/sql/index.html#array_min
presto https://prestodb.io/docs/current/functions/array.html