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

Can you explain how to find the third highest salary in SQL?

1 Answer

0 votes
by (88.2k points)

Here is the query to find out the third highest salary of all the employees. You can replace the value of 3 with any number to find out that particular highest salary of the table. This is a frequently asked question in interviews and you can read this SQL interview questions blog for more FAQs and how to answer them.

select e1.EmployeeName from Employee as e1

where 3 = (select count (*)

      from Employee e2

      where e2.salary >= e1.salary)

Related questions

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


Categories

...