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 trialChristian Geib
826 PointsSeem 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
11,110 PointsGive 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
826 PointsActually, 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
11,110 Points:) always use SINGLE ' ' in SQL its good if u will move to PHP for example :)
Damion Samuels
7,624 PointsSELECT * FROM results WHERE away_team = "Hessle" AND played_on >= "2015-10-01";
Christian Geib
826 PointsChristian Geib
826 PointsSorry 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";