SQL MIN() and MAX() Aggregate Functions. The following commands show how to User MAX() function and MIN() function in SQL.
SQL MIN() Syntax:
SELECT MIN(column_name)
FROM table_name
WHERE condition;
Example:
SELECT MIN(salary)
FROM employees;
SQL MAX Syntax:
SELECT MAX(column_name)
FROM table_name
WHERE condition;
Example:
SELECT MAX(salary)
FROM employees;