Find the third highest salary from the employee table | nth highest salary| SQL Server #shorts

preview_player
Показать описание
Write a Query to find the third highest salary from the employee table in SQL server.

#sqlquery
#3rdhighestsalary
#dkgautam
#interviewpoint
#youtubeshorts
#shorts
#viral
#viralvideo
Рекомендации по теме
Комментарии
Автор

The order by clause you wrote is not required. coz the inner query you wrote will fetch top 3 (75000, 65000, 50000) (without order by clause) and outer query will fetch min of those 3 which is 50000

sanjeevsjk
Автор

order by desc limit 1 nhi laga skte kya???

youngwolf
Автор

Select top 1 salary from
(Select top 3 salary from employee order by salary desc)sub
Order by salary

kandulasujith