MySQL GREATEST Function

Example

Return the greatest value of the list of arguments:

SELECT GREATEST(3, 12, 34, 8, 25);

Definition and Usage

The GREATEST() function returns the greatest value of the list of arguments.

Note: See also the LEAST() function. Continue reading MySQL GREATEST Function