array_max
function
Applies to: Databricks SQL Databricks Runtime
Returns the maximum value in array
.
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_max(array(1, 20, NULL, 3));
20