WNS-Vuram Interview Question

SQL Queries for given scenario