hi

You can take the help of inline query and rowid to solve these types of queries.
The query below may help you

select rownum,ename,salary
from (select ename,salary
from employee
...