Infosys interview question

Some basic SQL queries