array_max
function
Applies to: Databricks SQL Databricks Runtime
Returns the maximum value in array
.
Syntax
array_max(array)
Arguments
array
: Any ARRAY with elements for which order is supported.
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
Related functions
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for