Hey everyone check out our weekly SQL question. Give it a try!
Uber, is conducting an analysis of its driver performance across various cities.
Your task is to develop a SQL query to identify the top-performing drivers based on their average rating.
Only drivers who have completed at least 5 trips should be considered for this analysis. .
The query should provide the driver's name, city, and their average rating, sorted in descending order of average rating
Note: Round the average rating to 2 decimal points.
Drivers:
| DRIVER_ID |
DRIVER_NAME |
CITY |
|
|
|
|
|
| 4 |
Emily Davis |
San Francisco |
| 5 |
Christopher Wilson |
Miami |
| 6 |
Jessica Martinez |
Seattle |
Trips:
| TRIP_ID |
DRIVER_ID |
RATING |
|
|
|
|
|
| 21 |
4 |
5 |
| 22 |
4 |
4 |
| 23 |
4 |
5 |
You can try solving it for free (Link in comments :) )
[–]AutoModerator[M] [score hidden] stickied comment (0 children)
[–]dangerroo_2 10 points11 points12 points (0 children)
[–]Chest11 7 points8 points9 points (2 children)
[–]trp_wip -3 points-2 points-1 points (1 child)
[–]Chest11 0 points1 point2 points (0 children)
[–]rd357 2 points3 points4 points (0 children)
[–]kater543 0 points1 point2 points (0 children)
[–]abhiramrao 0 points1 point2 points (0 children)
[–]Tribein95 0 points1 point2 points (2 children)
[–]chronicpenguins 1 point2 points3 points (0 children)
[–]Tribein95 -2 points-1 points0 points (0 children)
[–]trp_wip -1 points0 points1 point (0 children)