select * from (select a.*,rownum r from (select * from emp order by HIREDATE) a where rownum < 10) where r > 5;