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 trialMarvin Abella
6,378 PointsGroup, Joining and cleaning up Challenge 2 of 3
Here is the challenge:
Like before, group reviews by "movie_id", get the average "score" as "average" and filter out any averages over 2.
And here's my solution:
SELECT AVG(score) AS average FROM reviews GROUP BY movie_id HAVING average > 2;
I believe I did it right but I'm still getting an error. Am I missing something here? help
10 Answers
Marvin Abella
6,378 Pointserrrhh..Fixed it, got confused by the 'filter out', it meant print out the average UNDER 2.
Elijah Collins
19,457 PointsSELECT AVG(score) AS average FROM reviews GROUP BY movie_id HAVING average < 2;
Mohsin Anwaar
10,696 Points2 months later and I made the same mistake :p
thanks for the answer
James Smythe
4,268 PointsI did the same!
Daniel Sullivan
8,166 PointsTook me a while to realize I was making this simple mistake. For anyone stuck, pay attention to your sign at the end.
Derrick Ray
19,083 PointsSo glad I'm not alone!
Airrick Dunfield
18,921 Pointshaha right there with you guys!
Manish M
2,606 PointsSpent 15 minutes to figure this out!
Ousama Berrag
24,109 PointsI made the same mistake 1 year later
priscillapwood
5,521 PointsAlmost a YEAR later and I made the same mistake as most people here! haha