I have tried the below query:
select empno from ( select empno from emp order by sal desc
You can use RANK or DENSE_RANK to achieve what you are trying to achieve here.
RANK
DENSE_RANK