MySQL MIN() and MAX() Functions
The MIN()
function returns the smallest value of the selected column.
The MAX()
function returns the largest value of the selected column. Continue reading MySQL MIN() and MAX() Functions
The MIN()
function returns the smallest value of the selected column.
The MAX()
function returns the largest value of the selected column. Continue reading MySQL MIN() and MAX() Functions
Find the price of the most expensive product in the “Products” table:
SELECT MAX(Price) AS LargestPrice FROM Products;
The MAX() function returns the maximum value in a set of values.
Note: Also look at the MIN() function.
MAX(expression)
The MIN()
function returns the smallest value of the selected column.
The MAX()
function returns the largest value of the selected column.
Find the lowest price in the Price column:
SELECT MIN(Price)
FROM Products;