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 trialAurthur Nhamburo
3,748 Pointssql basics
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.
Type in your command below.
2 Answers
Simon Coates
28,694 Pointsif you post the link to the challenge, i can take a proper look, but something like :
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
Masango Dewheretsoko
19,661 PointsHie you can try this from Masango Dewheretsoko
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;
Aurthur Nhamburo
3,748 PointsAurthur Nhamburo
3,748 Pointsselect 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;
that worked re-started the challenge and realised where i was messing up thanks,