我想在不使用 sql 之类的rank
任何函数的情况下明智地找到第三高薪部门我的逻辑row_number
dense_rank
select max(salary),deptno from emp
where salary not in
(select max(salary) from emp where salary not in
(select max(salary) from emp group by deptno)group by deptno)
group by deptno
这是我的查询。语法是正确的,但它没有给出正确的答案/结果