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

Cole Vance
Cole Vance
882 Points

What is my query missing? SELECT * FROM users WHERE last_name = "Hinkley" OR "Pettit";

I have tried multiple ways to write this query and have not been able to pass inspection.

2 Answers

The statement needs last_name for each value:

select * from users where last_name = "Hinlkey" OR last_name = "Pettit"
Cole Vance
Cole Vance
882 Points

Thank you for your help. I tried your suggestion and it didn't work. I double checked for silly mistakes and spelling etc. I'm thinking there's something wrong with the question.

I must have copied the wrong string, it had a typo on Hinkley, try this:

select * from users where last_name = "Hinkley" OR last_name = "Pettit"