Pergunta de entrevista da empresa Carousell

SQL question to write query with joins