GREATEST
edit
Returns the maximum value from many columns. This is similar to MV_MAX
except it’s intended to run on multiple columns at once.
ROW a = 10, b = 20 | EVAL g = GREATEST(a, b)
a:integer | b:integer | g:integer |
---|---|---|
10 |
20 |
20 |
When run on keyword
or text
fields, this’ll return the last string
in alphabetical order. When run on boolean
columns this will return
true
if any values are true
.
Supported types:
first | rest… | result |
---|---|---|
boolean |
boolean |
boolean |
integer |
integer |
integer |
keyword |
keyword |
keyword |
long |
long |
long |
text |
text |
text |