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

Development Tools Database Foundations SQL Calculating, Aggregating and Other Functions Grouping, Joining and Cleaning Up

Leigh Maher
Leigh Maher
21,830 Points

Where does the word 'average' come from?

At around 5 minutes in this tutorial Andrew adds this to the query:

average > 3

This query brings back an error for me, and I wasn't surprised because it doesn't seem to relate to anything else in the query and it's not a keyword. I replaced it with this and it worked fine:

AVG(score) > 3

Anyone know where this 'average' word comes from and why should it work?

Thanks.

Leigh Maher
Leigh Maher
21,830 Points

Ah, sorry, please ignore my question. My mistake was that I had named the alias as average_score and not average, as Andrew had done. So, I see what it relates to now.