The GREATEST and LEAST functions select the largest or smallest value from a list of any number of expressions.
Signatures & examples
LEAST(value [, ...])
The GREATEST and LEAST functions select the largest or smallest value from a list of any number of expressions. The expressions must all be convertible to a common data type, which will be the type of the result (see Section 10.5 for details).Version history 2