GlobalLogic Interview Question

SQL query for Joining Tables