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

# `least` 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 least value of all parameters, skipping null values.

## Syntax

```
least(expr1, expr2 [, ...] )
```

## Arguments

* `exprN`: An expression of any type that shares a least common type with all other arguments.

## Returns

The result is the least common type of all arguments.

## Examples

```sql
> SELECT least(10, 9, 2, 4, 3);
 2
```

## Related

* [`greatest` function](https://docs.databricks.com/aws/en/sql/language-manual/functions/greatest.md)
* [SQL data type rules](https://docs.databricks.com/aws/en/sql/language-manual/sql-ref-datatype-rules.md)
