Pregunta de entrevista de Adyen

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