Answers for "given a table of employees and their salaries, write a query to find employee with the second highet salary"

SQL
1

second max salary in sql

SELECT MAX(SALARY) 'SECOND_MAX' FROM EMPLOYEES
WHERE SALARY <> (SELECT MAX(SALARY) FROM EMPLOYEES);
Posted by: Guest on November-27-2020
0

how to get employee having maximum experience in mysql

select max(salary), dept_id from employee where salary not in(select max(salary) from employee) group by dept_id;
Posted by: Guest on November-02-2020

Code answers related to "given a table of employees and their salaries, write a query to find employee with the second highet salary"

Code answers related to "SQL"

Browse Popular Code Answers by Language