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 trial

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..