Shepper interview question

A technical SQL question based on their database