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

Need more help with SQL basics, having trouble with more of the equations

It has to do with numbers and more equations

Can you show us what you have tried or explain what you're having trouble with?

Its a sports team database that involves home score, away team, away score

Is it the wording of the Challenge you are having trouble understanding what the goal is?

8 Answers

Task 1 is asking to get the away_team named 'Hessle' as well as where they scored, away_score, greater than 18 points.

I tried typing out what I though was the right equation, but it was wrong

Can you post what you attempted, please?

I'm doing beginning SQL basics, the view challenge button should be here

I understand what the Challenge is. I don't just want to give you the answer. I want to see what you have tried so we can work through it together.

I've watched the video many times, I tried to to type how the equation should go, but it's always wrong, I either haven't included everything or There's something wrong with it, it's really frustrating.

Hence the request to share what you have tried so we don't have to flat out give you the answer. ;-)

Start out with, SELECT * FROM results WHERE , and then use the hints I gave in a previous answer.

SELECT "Hessle" FROM results WHERE id = away_team AND away_score > 18;

Thanks for your help. I've tried many attempts. This is the last one I tried. What do you think ?

Thank you for adding your attempt!

You're not too far off, really.

After the SELECT we always say which fields, or columns as they are typically called, we want returned. Using an asterisk (*) we mean to grab every column in the table.

What the Challenge is looking for is:

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

Thank you for the help, now I'm trying to figure out the second part of the task and this is what I've got so far SELECT * FROM users WHERE last_name = "Hinkley" OR "Pettit"

I can't figure out what I'm leaving out or if I'm wording it wrong

... WHERE last_name = 'Hinkley' OR last_name = 'Pettit'

Try to use single quotes as some database engines, such as Microsoft SQL Server, don't like the use of double quotes for String designation.

Thank you, it helped

You're welcome. Happy coding! :-)