Pergunta de entrevista da empresa Shepper

A technical SQL question based on their database