SQL query to find Nth highest salary from a salary table

前端 未结 11 2236
隐瞒了意图╮
隐瞒了意图╮ 2020-11-28 10:45

How can I find the Nth highest salary in a table containing salaries in SQL Server?

11条回答
  •  庸人自扰
    2020-11-28 10:57

    SELECT * FROM 
    (select distinct postalcode  from Customers order by postalcode DESC)
    limit 4,1;
    

    4 here means leave first 4 and show the next 1.

    Try this it works for me.

提交回复
热议问题