(untested) something like this may do the job
WITHbase AS( select * -- get the table from sometable order by name -- in the desired order),twenty AS( select * -- get the first 30 rows from base where rownum < 30 order by name -- in the desired order)select * -- then get rows 21 .. 30from twentywhere rownum > 20order by name -- in the desired order
There is also the analytic function rank, that you can use to order by.