Nogamy interview question

I had a Home test in SQL