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 trialErin Clayton
3,840 PointsWhat's wrong with this code? Looks good to me?
SELECT home_team AS "Home Team", home_score AS "Home Score", away_team AS "Away Team", played_on AS "Date Played", away_score AS "Away Score" FROM results;
2 Answers
Grace Kelly
33,990 PointsHi Erin, you're code is technically correct, however the code challenge requires the columns be in a particular order which is: home_team, home_score, away_team, away_score, played_on
Hope that helps!!!
Dave StSomeWhere
19,870 PointsNothing really wrong with your code but the challenge is looking for a specific order for the variables and is providing a confusing error message about selecting from the "results" table.
Make sure you order the SELECT variables in the exact order in the challenge and it will be accepted.
Erin Clayton
3,840 PointsErin Clayton
3,840 PointsThanks... so you are saying in regular SQL order doesn't matter, right? But in Treehouse's SQL it is coded to where it has to go in order?
Okay. Got it.