least.asciidoc 702 B

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