Welcome to the Treehouse Community
The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Marvin 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,108 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