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

Christian Geib
Christian Geib
826 Points

Seem to receive the right result but still get error message

Hi all, judging by the table that I receive it seems to be the correct result. However, I still receive the following error message: 'Bummer! You're missing the date of the 1st October 2015 ("2015-10-01")' Any ideas:-)?

3 Answers

Patrik Horváth
Patrik Horváth
11,110 Points

Give us more info something like question :) but maybe this help and remmember YYYY-MM-DD , order by asc is default value

SELECT * FROM database WHERE ordered_on BETWEEN '2015-10-01' AND  '2015-10-31' ORDER BY ASC;
Christian Geib
Christian Geib
826 Points

Sorry I thought question and my code were attached, here's the original challenge: Challenge Task 1 of 1

'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". '

The code I suggested is: SELECT * FROM results WHERE played_on >= 2015-10-01 AND away_team = "Hessle";

Christian Geib
Christian Geib
826 Points

Actually, just checked, and you are right, the format for the date is quotation marks around it. That did the trick, thank you!

Patrik Horváth
Patrik Horváth
11,110 Points

:) always use SINGLE ' ' in SQL its good if u will move to PHP for example :)

SELECT * FROM results WHERE away_team = "Hessle" AND played_on >= "2015-10-01";