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

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
Simon Coates
28,694 Points

if 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

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;

that worked re-started the challenge and realised where i was messing up thanks,

Hie 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;