Pergunta de entrevista da empresa darwinLabs

How I would a SQL for a specific scenario