max second salary sql code example
Example 1: how to find max and min salary in sql
SELECT MAX(SALARY) FROM EMPLOYEES
UNION
SELECT MIN(SALARY) FROM EMPLOYEES;
Example 2: first max salary in sql
SELECT first-name
FROM employees
WHERE salary = (SELECT MAX(salary) FROM employees);