LEAST
This function returns the smallest of the provided values.
Syntax
LEAST(VALUE1 [, VALUE2, ..., VALUEN])
Arguments
VALUE
Type: double, bigint, string, timestamp, date, array
A value of any of the above types, provided that all values are of the same type.
Returns
Type: same as input
The smallest of the provided values.
When the input values are arrays, the smallest element between all the arrays is returned.
If any of the input values are null, the result is null as well.