ZS Associates Interview Question

SQL queries and puzzles were asked