Fixed pagination query for Oracle