least.asciidoc 849 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. [discrete]
  2. [[esql-least]]
  3. === `LEAST`
  4. *Syntax*
  5. [.text-center]
  6. image::esql/functions/signature/least.svg[Embedded,opts=inline]
  7. *Parameters*
  8. `first`::
  9. First of the columns to evaluate.
  10. `rest`::
  11. The rest of the columns to evaluate.
  12. *Description*
  13. Returns the minimum value from multiple columns. This is similar to
  14. <<esql-mv_min>> except it is intended to run on multiple columns at once.
  15. NOTE: When run on `keyword` or `text` fields, this returns 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[]
  20. *Example*
  21. [source.merge.styled,esql]
  22. ----
  23. include::{esql-specs}/math.csv-spec[tag=least]
  24. ----
  25. [%header.monospaced.styled,format=dsv,separator=|]
  26. |===
  27. include::{esql-specs}/math.csv-spec[tag=least-result]
  28. |===