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 on More than One Condition

This is easy but I didn't know what's wrong with my SQL code. I guess played_on means who play in that game.

The system keeps responding me " Did I select from results table? I checked the typing and tried to add around the word "results" but still doesn't work.

4 Answers

Yes, that's exactly the problem. You want to select on the team, and not the "played_on" column, which is a date.

Good work.

Well, I think I found the problem. The column "played_on " means the date while "away_team" means the player. So the code should be :

SELECT * FROM results WHERE away_team='Hessle' AND away_score > 18

Can you post your code?

It's hard to tell what the problem is without looking at your code.

Sorry, Here is my code:

SELECT * FROM results WHERE played_on='Hessle' AND away_score > 18