Returns the maximum expression value found in each group of rows.
MAX( [ DISTINCT ] expression )
expression The expression for which the maximum value is to be calculated. This is commonly a column name.
DISTINCT expression Returns the same as MAX( expression ), and is included for completeness.
The same data type as the argument.
Rows where expression is NULL are ignored. Returns NULL for a group containing no rows.
For simple comparisons of two expressions, you can also use the GREATER function. See GREATER function [Miscellaneous].
SQL/2008 Core feature.
The following statement returns the value 138948.000, representing the maximum salary in the Employees table.
SELECT MAX( Salary ) FROM Employees;