1- 求排名前6-10 的员工
方法一:
select employee, salary
from (
select employee, salary, row_number() over (order by salary desc) r
from salary_table
)
where r between 6 and 10;
======================================
方法二:
select employee, salary
from (
select employee, salary, rank() over (order by salary desc) r
from salary_table
)
where r between 6 and 10;