Write a query to find the top 5 countries by total Wix premium revenue generated in the last 30 days.
Assume revenue includes only successful Wix premium payments, and treat CURRENT_DATE as 2026-09-15 for evaluating the sample data.
country and total_revenue.total_revenue descending and country ascending to break ties.| Column | Type | Description |
|---|---|---|
| payment_idPK | INT | Unique payment identifier |
| site_id | INT | Wix site associated with the payment |
| paid_at | TIMESTAMPTZ | Timestamp when the payment was recorded |
| amount | NUMERIC(12,2) | Payment amount in the reporting currency |
| product_type | VARCHAR(30) | Purchased product category |
| status | VARCHAR(20) | Payment processing status |
| Column | Type | Description |
|---|---|---|
| site_idPK | INT | Unique Wix site identifier |
| country | VARCHAR(100) | Country associated with the Wix site |