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

Christian Antfeld
Christian Antfeld
1,087 Points

SQL basics: bug or is my answer wrong?

I am receiving a message of "You didn't select all the the fields" when it appears that I have. Am I missing something?

Jonathan Grieve
Jonathan Grieve
Treehouse Moderator 91,252 Points

Hi Christian,

Could you please post us your code or a link to the challenge you're struggling with. Thanks :-)

Christian Antfeld
Christian Antfeld
1,087 Points

Sorry, I thought I had the box checked for adding the code to my post. I have moved past the module that was giving me issues instead of waiting for a response that I didn't know would be so quick. Thank you for your attempt at helping me though. I'll be sure to add the code myself if I have issues in the future. :)

Christian Antfeld
Christian Antfeld
1,087 Points

I am having the same issue again so I can share this one with you.

My code:

SELECT id, name, description, price FROM products WHERE price IN (7.99, 9.99, 11.99);

The situation:

Find all of the items in the products table with the prices of 7.99, 9.99, and 11.99 without using the OR keyword. The listed columns after the SELECT keyword are all of the columns listed in the question.

1 Answer

Steven Parker
Steven Parker
229,732 Points

The challenge is expecting you to use the shorthand.

When the challenge says "all the fields", it is expecting you to use the asterisk (*) character as a shorthand to represent all fields.

SELECT * FROM ...
Christian Antfeld
Christian Antfeld
1,087 Points

I had just figured that out after you added this comment. Thank you for your help though.