NTT DATA interview question

Sql Server queries