Infosys interview question

Some basic sql queries