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

bug in Database Foundations SQL Calculating, Aggregating and Other Functions Numeric and Aggregate Functions

The task states "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". " but it errors saying to alias it as "min_score" and I can't figure out what it wants to make it work. After many iterations I currently have "Select avg(score) as min_score from reviews group by movie_ID;" Please help

4 Answers

Treehouse Staff...if you could help me out, I would really like to get past this one. Thanks :)

I also kept getting an error message - took me forever to work it out but eventually this is what worked for me

SELECT AVG(score) AS average_all_scores FROM reviews WHERE score;

So I am not sure if it was a bug, or not because I must have typed that same line over and over! The only thing I can think of is that I was so tired - I was typoing somewhere. I went to bed and half an hour later I had to get up and come back to the task because it was bothering me. Typed it in again and it worked.

Hope it helps you too!

Try the following code, it will work SELECT AVG(score) AS average_all_scores FROM reviews;

That is what I used. I had put AVG(scores) instead of AVG(score),

Treehouse staff the bug is still not fixed..