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.

General Discussion

Chris Dziewa
Chris Dziewa
17,781 Points

Database Foundations > Numeric Aggregate Functions > errors in directions

Note that this is not a question. Andrew Chalkley, there are typos in the directions for task 2 in the challenge:

In the "reviews" table, with columns "score" and "movieid", return the minimum score for the movie with the id of 2. Alias the minimum score as "minscore".

This error comes up: Bummer! There's something wrong with your query, alias the MIN(score) AS min_score and SELECT from the 'reviews' table for 'movie_id' 2.

Notice how the underscores weren't asked for in the alises. Also in some of the later challenges in this course there were several issues of html entities being escaped, making it difficult to read the instructions. Besides these few issues, it was a great course. Thanks!

8 Answers

Andrew Chalkley
STAFF
Andrew Chalkley
Treehouse Guest Teacher

Hi Chris Dziewa

Sorry for the trouble you're having. Our code challenge engine is stripping out underscores (_) from our questions. One of our developers Jay McGavren is looking in to it now to fix it.

Regards
Andrew

Chris Dziewa
Chris Dziewa
17,781 Points

Awesome thanks Andrew. I was just doing some review and thought I'd pass it along!

Jay McGavren
Jay McGavren
Treehouse Teacher

Hi, Chris Dziewa ,

We made some updates to how challenge questions are presented, but it looks like the Database Foundations course got missed. Sorry for the trouble! All the challenges should be fixed now, but please email us at help@teamtreehouse.com if you have any further issues!

Moritlha Madisha
Moritlha Madisha
5,014 Points

yes, it was. but got it to work. my bad.

Did you guys get this to work?

For the question:

In the "reviews" table, with columns "score" and "movie_id", return the minimum score for the movie with the id of 2. Alias the minimum score as "min_score".

I'm entering in:

SELECT score, movie_id, MIN(score) AS min_score FROM reviews WHERE movie_id = 2;

But I still get the error:

Bummer! There's something wrong with your query, alias the MIN(score) AS min_score and SELECT from the 'reviews' table for 'movie_id' 2.

Nevermind... It only wanted the alias part ...MIN(score) AS min_score... without the other two columns.

Kelber Stuchi
Kelber Stuchi
30,478 Points

SELECT MIN(score) AS min_score FROM reviews WHERE movie_id = 2;

SELECT MIN(score) AS min_score FROM reviews WHERE movie_id = 2;

This is my answer and it actually worked.

Trevor Richie
PLUS
Trevor Richie
Courses Plus Student 4,902 Points

The question is worded awkwardly. It makes the student believe that there should be three columns displaying (score, movie_id, and min_score). I spent about 15 minutes in the Workbench and the Code Challenge trying to figure this out. Kelber Stuchi has the right answer, but the question didn't lead me there.