elasticsearch/docs/reference/esql/functions/least.asciidoc
Nik Everett 4cd7f40712
ESQL: More docs (#98890)
Adds some more typed docs to the ESQL functions.
2023-08-28 11:17:04 -04:00

24 lines
691 B
Text

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