GlobalLogic Interview Question

SQL Query