# MV_MAX

Converts a multivalued expression into a single-valued column containing the maximum value.

## Syntax

`MV_MAX(field)`

### Parameters

#### `field`

Multivalue expression.

## Examples

```esql
ROW a=[3, 5, 1]
| EVAL max_a = MV_MAX(a)
```

Finds the maximum value in the multivalued column `a`, resulting in `max_a = 5`.

```esql
FROM bag_of_numbers
| EVAL max = MV_MAX(numbers)
```

Finds the maximum value in the column `a` by comparing the strings' UTF-8 representations, resulting in `max_a = "zoo"`.

## Supported Types

This function can be used with any column type, including `keyword` columns. For `keyword` columns, it picks the last string by comparing their UTF-8 representation byte by byte.
