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

Databases SQL Basics Getting Data from a Database Categorizing Your Output with 'AS'

The columns you selected were named Home Team, Home Score, Away team, Away Score, Date Played and not 'Home Team', 'Home

What this means?

Steven Parker
Steven Parker
231,269 Points

Please show the code you submitted to get this response.

1 Answer

This is a task 4 in quiz: In this sports team database there's a results table with the columns of id, home_team, home_score, away_team, away_score and played_on. Alias "Home Team", "Home Score", "Away Team", "Away Score" and "Date Played" to the appropriate columns.

My guess is you used: SELECT home_team AS "Home Team", home_score AS "Home Score", away_team AS "Away Team", away_score AS "Away Score", played_on AS "Date Played" from results;

Error message on this one is not ideal, if you have a typo anywhere it shows you this instead of pointing you to a value where you have the issue. ( for instance, if your code was containing something like ...away_team AS "away Team" ... you would get this error, since quiz is only looking for exact case sensitive match in answer)