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 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,529 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,152 Points

If it helps you can actually indent your SQL statements Ariel

For example using Josh's solution

SELECT *
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: