Retrieve the price of the highest-priced product from the “Products” table.
SELECT MAX(Price) AS LargestPrice FROM Products; |
The MAX() function retrieves the highest value within a set of values.
Note: Also refer to the MIN() function for finding the minimum value.
MAX(expression) |
Parameter |
Description |
expression |
Mandatory: A numerical value, which can be either a field or a formula. |
Works in: | From MySQL 4.0 |