Infosys interview question

Join query in sql