Altimetrik interview question

Easy to moderate level SQL question