Write a query to identify top-performing service technicians based on historical job data at ServiceTitan. Include only technicians with at least two completed jobs, and rank them by total completed job revenue.
technician_name, completed_jobs, total_revenue, average_rating, and performance_rankperformance_rank ascending, then technician_name ascending| Column | Type | Description |
|---|---|---|
| technician_idPK | INT | Unique technician identifier |
| technician_name | VARCHAR(100) | Technician display name |
| trade | VARCHAR(50) | Primary service trade |
| Column | Type | Description |
|---|---|---|
| assignment_idPK | INT | Unique assignment identifier |
| job_id | INT | Assigned job identifier |
| technician_id | INT | Assigned technician identifier |
| assigned_at | DATE | Date the job was assigned |
| Column | Type | Description |
|---|---|---|
| job_idPK | INT | Unique job identifier |
| status | VARCHAR(20) | Current job status |
| completed_at | DATE | Date the job was completed |
| revenue | NUMERIC(12,2) | Revenue generated by the job |
| customer_rating | NUMERIC(2,1) | Optional customer rating from one to five |