Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Databases

Jonathan Grieve
MOD
Jonathan Grieve
Treehouse Moderator 90,956 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 90,956 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
220,425 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
220,425 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 90,956 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
220,425 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: