Oracle Interview Question

sql query to solve dbms