ZS Associates Interview Question

Sql questions using joins and subquery