ZS Associates interview question

SQL queries upto nested queries level.