Link Search Menu Expand Document

ARRAY_MAX

Returns the maximum element in an array.

Syntax

ARRAY_MAX(<array>)

Parameters

Parameter Description Supported input types
<array> The array or array-type column to be checked ARRAY

Return Type

NUMERIC

Example

The following examples calculates the maximum number in the levels array:

SELECT
	ARRAY_MAX([ 1, 2, 3, 4 ]) AS levels;

Returns: 4