mv_min.asciidoc 831 B

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