mv_min.asciidoc 913 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. [discrete]
  2. [[esql-mv_min]]
  3. === `MV_MIN`
  4. *Syntax*
  5. [.text-center]
  6. image::esql/functions/signature/mv_min.svg[Embedded,opts=inline]
  7. *Parameters*
  8. `v`::
  9. Multivalue expression.
  10. *Description*
  11. Converts a multivalued expression into a single valued column containing the
  12. minimum value.
  13. *Supported types*
  14. include::types/mv_min.asciidoc[]
  15. *Examples*
  16. [source.merge.styled,esql]
  17. ----
  18. include::{esql-specs}/math.csv-spec[tag=mv_min]
  19. ----
  20. [%header.monospaced.styled,format=dsv,separator=|]
  21. |===
  22. include::{esql-specs}/math.csv-spec[tag=mv_min-result]
  23. |===
  24. It can be used by any column type, including `keyword` columns. In that case,
  25. it picks the first string, comparing their utf-8 representation byte by byte:
  26. [source.merge.styled,esql]
  27. ----
  28. include::{esql-specs}/string.csv-spec[tag=mv_min]
  29. ----
  30. [%header.monospaced.styled,format=dsv,separator=|]
  31. |===
  32. include::{esql-specs}/string.csv-spec[tag=mv_min-result]
  33. |===