Here is what I came up with. Its probably not the most elegant code,
but here it is anyway.
Analytics would yield a cleaner solution though.Code:select file_id, file_name, tablespace_name from ( select rownum rank, file_id, file_name, tablespace_name from ( select file_id, file_name, tablespace_name from dba_data_files order by 1 desc ) order by FILE_ID asc ) where rank in (3,4) order by file_id;





Reply With Quote