Cognizant Interview Question

Solving Complex Queries in sql