# MAX

The MAX function calculates the maximum value of a specified field.

## Syntax

`MAX(field)`

### Parameters

#### field

The field for which the maximum value is to be calculated.

## Examples

Calculate the maximum number of languages known by employees:

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

The MAX function can be used with inline functions:

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