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 trialPhil Ward
4,204 Pointsstuck on MYSQL the 3rd task of the challenge prior to this video
the challenge is this:
In the "reviews" table, with the column "score", return the average of all movie's joint scores. Alias the aggregated column as "average_all_scores".
i put this:
SELECT AVG(score) AS average_all_scores FROM REVIEWS;
and i get this:
Bummer! There's something wrong with your query, alias the AVG(score) AS min_score and SELECT from the 'reviews' table.
why is the error referring to an alias of a completely different coloumn name which the task doesn't even ask you to use? When i run this statement in mySQL it returns an average score for the whole review column of movies with no issue. Or it the task actually asking for something else?
1 Answer
Ken Alger
Treehouse TeacherPhil;
The Treehouse challenge engine can, at times, be very case sensitive. Try putting in your code with the table name in lowercase.
Ken
Ken Alger
Treehouse TeacherKen Alger
Treehouse TeacherPhil;
In addition to the challenge engine being case sensitive, depending on your MySQL installation statements themselves may be case sensitive. Generally speaking though with MySQL, table names are case sensitive, so REVIEWS would be different from reviews.
My general practice with MySQL statements is to put MySQL commands, i.e. SELECT, FROM, WHERE, etc. in uppercase and anything based on my data model, i.e. table names, column names, etc. in lowercase.
Ken