Pergunta de entrevista da empresa Federato

SQL question with double joins. DS&A easy question.