Adyen interview question

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