Oracle interview question

sql query to solve dbms