Payment volume by currency
EasyPayPalgroup bysumavgmax· 10 XP
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_amountrounded to 2 decimals; amounts stay in their own currency; any row order
Example 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 questions and the answer come with Pro.
Write your query here. Ctrl + Enter submits.