Your question is Top Taskers by Category. Start with the requirements and the three tables on the right.
Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.
Identify the top 3 Taskers by revenue in each category for the last month on TaskRabbit.
Use completed bookings only, with revenue based on the booking amount. Treat the last month as the previous calendar month relative to the query execution date.
category_name, tasker_id, tasker_name, total_revenue, and revenue_rank.| Column | Type | Description |
|---|---|---|
| tasker_idPK | INT | Unique Tasker identifier |
| tasker_name | VARCHAR(100) | Tasker display name |
| service_area | VARCHAR(100) | Primary service area |
| Column | Type | Description |
|---|---|---|
| category_idPK | INT | Unique task category identifier |
| category_name | VARCHAR(100) | Task category name |
| Column | Type | Description |
|---|---|---|
| booking_idPK | INT | Unique booking identifier |
| tasker_id | INT | Tasker assigned to the booking |
| category_id | INT | Category associated with the booking |
| amount | DECIMAL(10,2) | Booking revenue amount |
| status | VARCHAR(20) | Booking status |
| completed_at | TIMESTAMP | Timestamp when the booking was completed |