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 trialshiny peanut
5,113 PointsAS Keyword in SQL
I'm a little stuck on this last question. Went through it a few times thinking I might have a typo somewhere. Do you guys see the issue with this answer?
3 Answers
William Li
7,950 PointsThere is no column called date_played its name is played_on
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
shiny peanut
5,113 PointsThe one I'm stuck on is actually this one:
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.
So for that I put:
SELECT home_team AS "Home Team", home_score AS "Home Score", away_team AS "Away Team", away_score AS "Away Score", date_played AS "Date Played" FROM results;
And I'm not sure why it doesn't work since it follows the same premise as the others in that code challenge
William Li
7,950 PointsSELECT name AS 'Product Name', description AS 'Product Description' FROM products
The above works for me
btw you're pretty cute ;)