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 SQL Basics Finding the Data You Want Filtering by Dates

Ariel Escalante
Ariel Escalante
1,012 Points

I have selected all columns but the error message is telling me I have not selected all columns

Not sure what I'm doing wrong.

2 Answers

Josh Keenan
Josh Keenan
19,652 Points

Here's my solution, it selects all matches from the results table, where the away team is Hessle and the date it is played on is on, or after the 1st of october 2015

SELECT * FROM results WHERE away_team = "Hessle" AND  played_on >= "2015-10-01"
Tommy Gebru
Tommy Gebru
30,164 Points

If it helps you can actually indent your SQL statements Ariel

For example using Josh's solution

FROM results
WHERE away team = "Hessle" AND played_on >= "2015-10-01"

Also be sure to share you code with explanation next time for quicker responses! :smile: