mv_min.asciidoc 539 B

123456789101112131415161718
  1. [[esql-mv_min]]
  2. === `MV_MIN`
  3. Converts a multivalued field into a single valued field containing the minimum value. For example:
  4. [source,esql]
  5. ----
  6. include::{esql-specs}/math.csv-spec[tag=mv_min]
  7. include::{esql-specs}/math.csv-spec[tag=mv_min-result]
  8. ----
  9. It can be used by any field type, including `keyword` fields. In that case picks the
  10. first string, comparing their utf-8 representation byte by byte:
  11. [source,esql]
  12. ----
  13. include::{esql-specs}/string.csv-spec[tag=mv_min]
  14. include::{esql-specs}/string.csv-spec[tag=mv_min-result]
  15. ----