select max salary record sql code example
Example 1: second max salary in sql
SELECT MAX(SALARY) 'SECOND_MAX' FROM EMPLOYEES
WHERE SALARY <> (SELECT MAX(SALARY) FROM EMPLOYEES);
Example 2: max 3 salary in sql
SELECT salary, first_name, last_name FROM employees
ORDER BY salary DESC LIMIT 3;