0 votes
1 view
in SQL by (41.9k points)

Can you please tell me how to find nth highest salary in SQL?

1 Answer

0 votes
by (99.4k points)

The following is the query to find the nth highest salary from a table in SQL. This is the most commonly asked question in the interviews and you can read this SQL interview questions blog for more such FAQs in the SQL interview.

select e1.EmployeeName from Employee as e1

where n = (select count (*)

      from Employee e2

      where e2.salary >= e1.salary)

Related questions

0 votes
1 answer
asked Apr 21 in SQL by Sudhir_1997 (41.9k points)
0 votes
1 answer
asked Apr 20 in SQL by Sudhir_1997 (41.9k points)
0 votes
1 answer
Welcome to Intellipaat Community. Get your technical queries answered by top developers !


Categories

...