SQL Min and Max
SQL Min is used to return smallest value.
SQL Max is used to return largest value.
SELECT MIN(column_name)
FROM table_name
WHERE condition.
SELECT MAX(column_name)
FROM table_name
WHERE condition.
Return smallest value of quantity from Customer Table:
SELECT MIN(Quantity)
FROM Customer.
Return largest value of quantity from Customer Table:
SELECT MAX(Quantity)
FROM Customer.
Comments
Post a Comment