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 trialLuz Maria Valencia Bocanegra
3,463 PointsCategorizing, AS
Hi! I can't find the mistake and I keep getting Bummer!
Challenge Task 4 of 4
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.
SELECT home_team AS "Home Team", home_score AS "Home Score", away_team AS "Away Team", away_score AS "Away Score", played_on AS "Data Played" FROM results;
2 Answers
Jonathan Grieve
Treehouse Moderator 91,253 PointsThe code looks good! (I added the sql markdown to it by the way).
Try selecting the id field as well. There shouldn't be any need to alias it!
SELECT id, 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;
Actually, I have just noticed you're aliasing "Data Played" instead of "Date Played". So play around with that with or without the id field. :-)
Luz Maria Valencia Bocanegra
3,463 PointsThanks Jonathan it was "Date Played", silly mistake, thanks for your help