1
0

least.asciidoc 691 B

123456789101112131415161718192021222324
  1. [[esql-least]]
  2. === `LEAST`
  3. [.text-center]
  4. image::esql/functions/signature/least.svg[Embedded,opts=inline]
  5. Returns the minimum value from many columns. This is similar to <<esql-mv_min>>
  6. except it's intended to run on multiple columns at once.
  7. [source.merge.styled,esql]
  8. ----
  9. include::{esql-specs}/math.csv-spec[tag=least]
  10. ----
  11. [%header.monospaced.styled,format=dsv,separator=|]
  12. |===
  13. include::{esql-specs}/math.csv-spec[tag=least-result]
  14. |===
  15. NOTE: When run on `keyword` or `text` fields, this'll return the first string
  16. in alphabetical order. When run on `boolean` columns this will return
  17. `false` if any values are `false`.
  18. Supported types:
  19. include::types/least.asciidoc[]