Tell me about a time you solved practical business scenarios using aggregate functions, HAVING filters, and GROUP BY in SQL.
Use the provided schema and sample data to demonstrate a practical answer. Return drivers with at least two completed trips and at least 100 in total fare.
driver_name, city, completed_trip_count, total_fare, and average_fare.total_fare descending, then driver_name ascending for ties.| Column | Type | Description |
|---|---|---|
| driver_idPK | INT | Unique driver identifier |
| driver_name | VARCHAR(100) | Driver display name |
| city | VARCHAR(80) | Primary operating city |
| Column | Type | Description |
|---|---|---|
| trip_idPK | INT | Unique trip identifier |
| driver_id | INT | Driver assigned to the trip |
| status | VARCHAR(20) | Trip status |
| fare | DECIMAL(10,2) | Fare amount for the trip |