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.