Write a query to find the top 5 users by betting volume for each sport.
Use settled bets with a positive, non-null stake. Include the user's ID and name, the sport, and their total betting volume. Rank users by total volume within each sport, breaking ties by ascending user ID.
sport_name, user_id, user_name, total_betting_volume, and sport_rank.sport_name, then sport_rank.| Column | Type | Description |
|---|---|---|
| user_idPK | INT | Unique FanDuel user identifier |
| user_name | VARCHAR(100) | Display name of the user |
| Column | Type | Description |
|---|---|---|
| sport_idPK | INT | Unique sport identifier |
| sport_name | VARCHAR(50) | Name of the sport |
| Column | Type | Description |
|---|---|---|
| bet_idPK | INT | Unique bet identifier |
| user_id | INT | User who placed the bet |
| sport_id | INT | Sport associated with the bet |
| stake | NUMERIC(12,2) | Amount wagered on the bet |
| status | VARCHAR(20) | Settlement status of the bet |