select ename,salfrom(select (select count(distinct b.sal)from emp bwhere a.sal<=b.sal) as rnk,a.sal,a.enamefrom emp a)x where rnk<=5;