[discrete]
[[esql-mv_first]]
=== `MV_FIRST`

*Syntax*

[.text-center]
image::esql/functions/signature/mv_first.svg[Embedded,opts=inline]

*Parameters*

`v`::
Multivalue expression.

*Description*

Converts a multivalued expression into a single valued column containing the
first value. This is most useful when reading from a function that emits
multivalued columns in a known order like <<esql-split>>.

The order that <<esql-multivalued-fields, multivalued fields>> are read from
underlying storage is not guaranteed. It is *frequently* ascending, but don't
rely on that. If you need the minimum value use <<esql-mv_min>> instead of
`MV_FIRST`. `MV_MIN` has optimizations for sorted values so there isn't a
performance benefit to `MV_FIRST`.

include::types/mv_first.asciidoc[]

*Example*

[source.merge.styled,esql]
----
include::{esql-specs}/string.csv-spec[tag=mv_first]
----
[%header.monospaced.styled,format=dsv,separator=|]
|===
include::{esql-specs}/string.csv-spec[tag=mv_first-result]
|===
