SQL query to find the third highest salary in the company

0 0
Read Time:13 Second

The question is a bit confusing for the developer, Interviewer Always asks this question in SQL.

The most straightforward way that should work in any database is to do the following:

SELECT * FROM `employee` ORDER BY `salary` DESC LIMIT 1 OFFSET 2;
Happy
Happy
0 %
Sad
Sad
0 %
Excited
Excited
0 %
Sleepy
Sleepy
0 %
Angry
Angry
0 %
Surprise
Surprise
0 %

About Author

Average Rating

5 Star
0%
4 Star
0%
3 Star
0%
2 Star
0%
1 Star
0%

Leave a Reply

Your email address will not be published. Required fields are marked *