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 trialBao Tran
Front End Web Development Techdegree Student 18,959 PointsDatabase Foundations Stage 7: SQL Calculating, Aggregating and Other Functions
Having trouble with Task 1.
My Syntax appears to be working in MySQL Workbench. But does not work i code challenge. Any tip to why this may be the case?
SELECT movie_id, AVG(score) AS average FROM reviews GROUP BY movie_id;
Result in workbench:
'1', '2.8372' '2', '3.0732' '3', '3.8333' '4', '2.7000' '5', '3.6154' '6', '1.5000' '8', '2.9167'
1 Answer
Bao Tran
Front End Web Development Techdegree Student 18,959 PointsNever mind. Did more than it ask for.
My answer:
SELECT AVG(score) AS average FROM reviews GROUP BY movie_id;