Back to Elasticsearch

Greatest

docs/reference/query-languages/esql/kibana/docs/functions/greatest.md

9.4.0602 B
Original Source

% This is generated by ESQL's AbstractFunctionTestCase. Do not edit it. See ../README.md for how to regenerate it.

GREATEST

Returns the maximum value from multiple columns. This is similar to MV_MAX except it is intended to run on multiple columns at once.

Note: When run on keyword or text fields, this returns the last string in alphabetical order. When run on boolean columns this will return true if any values are true.

esql
ROW a = 10, b = 20
| EVAL g = GREATEST(a, b)