Infosys interview question

Database queries, normal stuff