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 - Filtering by Comparing Values_Code Challenge_Task 1

Ok guys, I had already posted this question before but without the code snippet..... now I know how to do it correctly. :D So, is there anything missing here? Because it looks correct to me..... thanks everyone!

***SQL

SELECT * FROM results WHERE home_team > 12;


3 Answers

Mateusz Lau
Mateusz Lau
18,905 Points

Hi Vincent,

It looks like you are using wrong column in your WHERE statment.

Correct query goes like this: SELECT * FROM results WHERE home_score > 12;

Konrad Pilch
Konrad Pilch
2,435 Points
SELECT * FROM results WHERE home_team > 12;
SELECT * FROM results WHERE home_score > 12;

It looks to me that they are the same. What do you mean?

Ok, it works. Thank you very much for your time.. Sometimes it's so frustrating when you find out the solution is so simple.... :D

Mateusz Lau
Mateusz Lau
18,905 Points

The home_score column in WHERE statment is the difference. Comparing home_team to value of 12 isn't correct in this task.

Thanks everyone guys...... That's the solution!