select * from (select e.*, dense_rank() over (order by salary desc) as rk from employee e)
where rk>=5
我遇到语法错误
关键字'其中'。
附近的语法不正确
问题是什么?
答案 0 :(得分:3)
试试这个:
select * from (select e.*,
dense_rank() over (order by salary desc) as rk
from employee e
) tmp --alias to from subquery
where tmp.rk>=5
希望这有帮助!