GREATEST

GREATEST(expr1,expr2[,...])
GREATEST returns the greatest value of the expressions. The returned data type is based on the data type of the first expression.