Write the SQL statement to find the 2nd & 3rd maximum salary of an employee

Опубликовано: 29 Октябрь 2024
на канале: OPEN SOURCE GURU JI
45
0

Write the SQL statement to find the 2nd & 3rd maximum salary of an employee?
====================================
SQL-Interview-Questions
====================================
Hello Friends,
I hope this video will help you to write down the SQL statement to find nth salary of employee.

You can access article link below:
(https) opensourceguruji.com/sql-interview-questions/

Code:
select * from (select first_name, salary, dense_rank() over (order by salary desc) top_rank from employees) where top_rank in (2,3);

Thanks,
Open source.
======================================
You can access article link below:
(https) opensourceguruji.com/sql-interview-questions/
=======================================
Blog Link:
(https) opensourceguruji.com
=======================================