Trusted Driver Monthly Ratings
Problem
**[Asked at Lyft]**
Lyft considers a driver "trusted" if they have received **more than 3 total reviews**.
For all trusted drivers, show their **average rating per month**, rounded to 2 dp.
Return `driver_id`, `review_month` (as 'YYYY-MM'), and `avg_rating`,
ordered by driver ID then month.
Tables
Example rows — the live problem includes the full dataset.
driver_reviews
| review_id | driver_id | rider_id | rating | review_date |
|---|
Expected output
Your answer should return 4 rows with the columns driver_id, review_month, avg_rating.
Starter code (SQL)
SELECT *
FROM driver_reviews;Solve this SQL question free
Write SQL and run it instantly in your browser — even on your phone. No signup needed to try.
Solution & explanation
Create a free account to unlock the optimal solution, a step-by-step explanation, and the hidden test cases that grade your answer.
Sign up free to unlock