Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialStefan Hoffmann
24,811 PointsIt asks me to group reviews by movie_id and get the average score per movie.
Why is this not right:
SELECT movie_id, AVG(score) AS average FROM reviews GROUP BY movie_id
2 Answers
Sara Chicazul
7,475 PointsYou're almost there! The key is: you don't need to include everything in your results. You can group by a column without including it in the data you select.
akshaythakur
Courses Plus Student 34,019 PointsYour query correct! What is problem??
Stefan Hoffmann
24,811 PointsThank you for your reply. It is correct measured by the text of the task. But since there is that hidden thing of both tables having an id column it does not pass validation. I'm sure they will fix it.
Stefan Hoffmann
24,811 PointsStefan Hoffmann
24,811 PointsYou are right. I tested the "both tables have the column id" approach. This is the accepted answer. The task text is misleading.