Dear experts,
greeting for trying to solve this problem. From employees table. I want to find those peoples(last_name) and salary who got the 3rd and 4rth higest salary in the department.
Printable View
Dear experts,
greeting for trying to solve this problem. From employees table. I want to find those peoples(last_name) and salary who got the 3rd and 4rth higest salary in the department.
what have you come up with so far then
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;
Thanks lot, gandolf989 for trying to solve this problem. We should share our knowledge globally.