Skip to main content
Returns the minimum element in an array.

Syntax

ARRAY_MIN(<array>)

Parameters

ParameterDescriptionSupported input types
<array>The array or array-type column to be checkedARRAY

Return Type

Same as the element type of the array.

Example

The following example calculates the minimum number in the levels array:
SELECT ARRAY_MIN([1, 2, 3, 4]) AS levels;
levels int null
1

Rows: 1Execution time: 6.39ms