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

find all results where the home team's above 12

We have a database that runs a sports team's website. In the results table we have the columns id, home_team, home_score, away_team, away_score, played_on.

select home_score from results; where home_score < 12

and the error say you didn't select all the columns, i tried each and every single thing.

I think you should search above 12, not under 12 right? So you should change your < to >.

4 Answers

Agnes Demes
Agnes Demes
6,613 Points

So the question is asking to list columns where the away team had Hessle playing AND where the away_team scored more then 18. in SQL : select * from results where away_team="Hessle" and away_score>18;

Thank you so much!

Agnes Demes
Agnes Demes
6,613 Points

Please send link and your code, Ive just completed the same test yesterday. One thing is 100% if the question starts with show/ select all columns then the query should start with SELECT (*).... but if you still need help please post link and sample code

Thank you,

I did that one but, can you please help me with this one. https://teamtreehouse.com/library/sql-basics/finding-the-data-you-want/filtering-on-more-than-one-condition-2 thank you

Agnes Demes
Agnes Demes
6,613 Points

Sure, Im happy to help . what do you have so far? what error message are you getting?

i wrote like this;

select Away_score from results where away_team ="hessle"

away_score

the error says you didn't select all coloumns.

Agnes Demes
Agnes Demes
6,613 Points

I've found with these questions even if you have 1 comma wrong it will come back with a mistake. They are looking for a very specific answer. for example many times i had the right solution but the naming convention was mistyped or the columns that were requested were in a different order. The error code you get is very helpful .