Infosys interview question

Mainly about sql