ZS Associates Interview Question

Puzzles, Guesstimates, Sql queries, DBMS.