ZS Associates interview question

My SQL queries and Puzzles from gfg platform