[discrete] [[esql-mv_last]] === `MV_LAST` [.text-center] image::esql/functions/signature/mv_last.svg[Embedded,opts=inline] Converts a multivalued field into a single valued field containing the last value. This is most useful when reading from a function that emits multivalued fields in a known order like <>: [source.merge.styled,esql] ---- include::{esql-specs}/string.csv-spec[tag=mv_last] ---- [%header.monospaced.styled,format=dsv,separator=|] |=== include::{esql-specs}/string.csv-spec[tag=mv_last-result] |=== The order that <> are read from underlying storage is not guaranteed. It is *frequently* ascending, but don't rely on that. If you need the maximum field value use <> instead of `MV_LAST`. `MV_MAX` has optimizations for sorted values so there isn't a performance benefit to `MV_LAST`. `MV_LAST` is mostly useful with functions that create multivalued fields like `SPLIT`. Supported types: include::types/mv_last.asciidoc[]