Revolut interview question

Write an SQL query with aggregation.