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!
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 trial
Database Foundations : Stage 7, Step 4, Grouping, Joining and Cleaning Up :: Code Challenge : 1 of 3
The challenge is :
Group all reviews by "movie_id" and get the average "score" and alias it as "average".
My sql query for the same :
select movie_id, avg(score) AS average from reviews group by movie_id;
I am getting a valid output with the error "Oops! There is something wrong with your query"
I can't preview what this 'something' is and I am unable to proceed to the next challenge. Please help me!
The link to the challenge is : http://teamtreehouse.com/library/grouping-joining-and-cleaning-up
SERGIO RODRIGUEZ17,532 Points
SELECT avg(score) AS average FROM reviews GROUP BY movie_id;
Hope this helps!