sql to find max salary in each department code example
Example 1: how to find max and min salary in sql
SELECT MAX(salary), MIN(salary) FROM employees;
Example 2: how to find max and min salary in sql
SELECT MAX(SALARY) FROM EMPLOYEES
UNION
SELECT MIN(SALARY) FROM EMPLOYEES;