MIN() AND MAX()
MIN() function returns the smallest value of the selected column
Syntax โ
SELECT MIN(ColumnName)
FROM <TableName>
WHERE<condition> ;
Example-
SELECT MIN(Price)
FROM Products;
MAX() function returns the largest value of the selected column
Syntax โ
SELECT MAX(ColumnName)
FROM <TableName>
WHERE<condition> ;
Example-
SELECT MAX(Price)
FROM Products;
Note-
Northwind database is used for examples.
Leave a Reply