Hexaware Technologies Interview Question

SQL query