Write an SQL query using window functions to rank users by revenue within each country and return the top 3 users per country.
Use the provided users and transactions tables. Include tied users when they share a qualifying rank.
user_id, user_name, country, total_revenue, and revenue_rank.| Column | Type | Description |
|---|---|---|
| user_idPK | INT | Unique user identifier |
| user_name | VARCHAR(100) | User display name |
| country | VARCHAR(2) | Two-letter country code |
| Column | Type | Description |
|---|---|---|
| transaction_idPK | INT | Unique transaction identifier |
| user_id | INT | User associated with the transaction |
| revenue | DECIMAL(12,2) | Revenue generated by the transaction |