我试图从这样的前 5 名员工那里获得所有 3 最高薪水
salary
35000
34000
20000
12000
500
40000
25000
41000
90000
550000
询问
select top 5
(SELECT MAX(grosssalary) FROM Detail) maxsalary ,
(SELECT MAX(grosssalary) FROM Detail) sec_max_salary,
(SELECT MAX(grosssalary) FROM Detail
WHERE grosssalary NOT IN (SELECT MAX(grosssalary) FROM Detail )) as third_max_salary
但这显示了这样的数据
maxsalary sec_max_salary third_max_salary
550000 550000 41000
我想要这样的数据在哪里
maxsalary sec_max_salary third_max_salary
550000 90000 41000