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 trialabhradeep mazumdar
551 PointsMYSQL grouping, joining, cleanup exercise
To the problem statement :
Like before, group reviews by "movie_id", get the average "score" as "average" and filter out any averages over 2.
My query is :
select avg(score) as average from reviews group by movie_id having average > 2;
It throws error. Please help.
The output of the command is :
average 0.30732E1 0.38333E1 0.27E1 0.36154E1 0.29167E1
1 Answer
Andrew Chalkley
Treehouse Guest TeacherYou're very close.
having > 2
will only bring back those averages over two. However the question asks you to filter those out.
Hope that helps
Andrew