The function MAX returns the maximum value of items in a group. Without a
GROUP BY clause it will aggregate with all rows of the SELECT.
SQL Syntax:
|
|
MAX( expression ) |
Parameters:
|
|
expression
A expression of any data type without a aggregate function.
|
Return Type:
|
|
the same as the expression. |
Examples:
SELECT MAX( price ) FROM mytable
SELECT MAX( price ) FROM mytable
SELECT MAX( price ) FROM mytable t GROUP BY t.name
see also:
MIN
SQL Aggregate Functions
|