TalkTalk interview question

It was sql exercise in microsoft