Adyen interview question

They asked me to write an sql query