Welcome to the Treehouse Community
Looking to learn something new?
Gareth Redfern36,217 Points
PHP / Database Help On Task 3
Can anyone help with the following task, as I am sure my answer is correct but I must be misunderstanding the question. Here is my answer:
SELECT movie_id, AVG(score) AS average FROM reviews GROUP BY movie_id;
You just need to remove
movie_id from the list of fields that you're selecting. Your query is correct, but I guess Treehouse's validation engine gives an error if you do extra things beyond what the question asks for.
Paul Yabsley46,713 Points
It is a valid query but the question doesn't ask for the movie_id to be selected, only to group by it. Try removing movie_id from the select clause.