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

Jonathan Grieve
MOD
Jonathan Grieve
Treehouse Moderator 91,252 Points

I've selected all the columns required but the task won't pass.

Here's a tricky one.

The Questions is as follows

We're back in the sports team database. There's a results table with the columns id, home_team, home_score, away_team, away_score and played_on .
Find all the matches in the results table where "Hessle" was playing away as the away team and if they played on or after October 1st 2015. Date format is "YYYY-MM-DD".

To which my response is

select id, home_team, home_score, away_team, away_score, played_on from results where away_team = "Hessle" AND played_on >= "2015-10-01";

But it keeps telling me I've not selected all the columns. What am I missing? :)

Jonathan Grieve
Jonathan Grieve
Treehouse Moderator 91,252 Points

Well yes but this is what i did. All the matches which said to be all the fields. A technique which has passed challenges for me in this course before. :-)

Steven Parker
Steven Parker
229,670 Points

Sure, SOMETIMES you can get away with a little extra...

But I learned early on that making it WORK and making it PASS are not exactly the same thing!

1 Answer

Steven Parker
Steven Parker
229,670 Points

You didn't provide a link to the challenge, but assuming that is a complete list of the table's columns...

:point_right: I would guess they are looking for a * instead of a column list.

Jonathan Grieve
Jonathan Grieve
Treehouse Moderator 91,252 Points

Yup, that's the one. I guess my approach though valid code was too much work for the challenge ;)

And it's interesting because I made my post from the challenge page so it should have given a link to the page. :)

Steven Parker
Steven Parker
229,670 Points

It sure should have, report that as a bug!

And you've clearly had more TH courses than me, you should know the golden challenge rule: Never do anything other than what the challenge specifically asks for. :wink: