ZS Associates interview question

About DBMS, SQL, Puzzles from GFG