Pergunta de entrevista da empresa Adyen

a SQL question about select query with data filtering and group by