Nogamy Interview Question

I had a Home test in SQL