Infosys Interview Question

SQL, coding