Average order value by country

SQLMedium10 min

Your task

For paid orders, return the average order value per country as country and avg_cents, rounded to a whole number, largest average first.

Tables

customer
idINTEGERnameTEXTcountryTEXTsigned_upTEXT
1AnkaDE2025-12-20
2BoUS2025-12-14
3CyUS2026-01-05
4DaraJP2026-02-01
orders
idINTEGERcustomer_idINTEGERplaced_onTEXTtotal_centsINTEGERstatusTEXT
112026-01-0412000paid
212026-01-193500refunded
322026-01-2189000paid
422026-02-0215000paid
532026-02-144200pending
622026-02-2822000paid
More rows not shown