Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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 90,705 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
215,953 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.