| 12345678910111213141516171819202122232425262728293031323334353637383940414243 | [discrete][[esql-mv_max]]=== `MV_MAX`*Syntax*[.text-center]image::esql/functions/signature/mv_max.svg[Embedded,opts=inline]*Parameters*`v`::Multivalue expression.*Description*Converts a multivalued expression into a single valued column containing themaximum value.include::types/mv_max.asciidoc[]*Examples*[source.merge.styled,esql]----include::{esql-specs}/math.csv-spec[tag=mv_max]----[%header.monospaced.styled,format=dsv,separator=|]|===include::{esql-specs}/math.csv-spec[tag=mv_max-result]|===It can be used by any column type, including `keyword` columns. In that caseit picks the last string, comparing their utf-8 representation byte by byte:[source.merge.styled,esql]----include::{esql-specs}/string.csv-spec[tag=mv_max]----[%header.monospaced.styled,format=dsv,separator=|]|===include::{esql-specs}/string.csv-spec[tag=mv_max-result]|===
 |