# MAX

The `MAX` function returns the maximum value of a field.

## Syntax

`MAX(field)`

### Parameters

#### `field`

The field for which the maximum value is calculated.

## Examples

Basic Usage

```esql
FROM employees
| STATS MAX(languages)
```

Calculate the maximum value of the `languages` field.

Using Inline Functions

```esql
FROM employees
| STATS max_avg_salary_change = MAX(MV_AVG(salary_change))
```

Calculate the maximum value of the average salary change by first averaging the multiple values per row using the `MV_AVG` function and then applying the `MAX` function.
