Yasser Oracle Blog Dive in Oracle with Yasser, Oracle Developer Courses
select * from ( select sal, rank() over (order by sal DESC/ASC) rnk from emp ) where rnk = 1/2/3/4/5/6/...;