How to get the Nth highest salary of an employee?

Поделиться
HTML-код
  • Опубликовано: 11 июл 2022
  • 1. Full .NET Interview Course
    C# / ASP.NET Core / MVC / API - Top 500 Interview Questions
    www.udemy.com/course/csharp-o...
    Don't worry if course not helping you, Udemy has 30 days Free Refund Policy.
    2. Quick Revision Book (PDF format)
    Top 500 .NET Interview Questions - OOPS/ C#/ ASP.Net/ MVC/ SQL /.Net Core /Web API
    imojo.in/interviewhappy
    50% Discount Applied on above link.
    Don't worry if book not helping you, I will return 100% of your money with in 7 days of purchase. Just mail me at anuragrawat123@gmail.com.
    My best wishes are with you.

Комментарии • 5

  • @lentg291
    @lentg291 2 года назад +2

    Better way is using CTE with DENSE_RANK method instead of using subquery; since this is a classic way; Well explained

    • @interviewhappy
      @interviewhappy  2 года назад +2

      Yup, that is next level way of doing this.

  • @Devdumplings
    @Devdumplings Год назад +1

    Some one asked me what charindex will do please add this

  • @umar-official
    @umar-official 7 месяцев назад

    Select * from Employees order by Salary desc offset 2 row fetch next 1 row only
    By this also we can get any desired result