---
title: array_min function
description: Learn the syntax of the array\_min function of the SQL language in Databricks SQL and Databricks Runtime.
canonical_url: https://docs.databricks.com/aws/en/sql/language-manual/functions/array_min
---

# `array_min` function

**Applies to:** ![check marked yes](https://docs.databricks.com/aws/en/images/icons/check.png) Databricks SQL ![check marked yes](https://docs.databricks.com/aws/en/images/icons/check.png) Databricks Runtime

Returns the minimum value in `array`.

## Syntax

```
array_min(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

```sql
> SELECT array_min(array(1, 20, NULL, 3));
 1
```

## Related functions

* [`array_max` function](https://docs.databricks.com/aws/en/sql/language-manual/functions/array_max.md)
