PayPal's treasury team needs a quick summary of completed payments in each currency to plan cash reserves.
For completed transactions, show per currency the number of transactions, the total amount, the average amount and the largest single amount.
Expected output
avg_amount rounded to 2 decimals; amounts stay in their own currency; any row orderExample of the shape (made-up values):
| currency | txns | total_amount | avg_amount | max_amount |
|---|---|---|---|---|
| GBP | 410 | 30500.00 | 74.39 | 299.10 |
Hints, the later steps and the answer come with Pro.
Write your query here. Ctrl + Enter submits.