Infosys Interview Question

a question based on sql query