ITC Infotech interview question

DBMS, SQL, Riddle, OOPs concept