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 trialLeo Lanahan
22,018 PointsSearching within a set of values 1 of 2
I'm getting the error message " Bummer! You're missing a WHERE clause!" when I try and run this query: SELECT * from products where price in ("7.99", "9.99", "11.99"); I get a different error message "Bummer! You didn't select all columns" when I try this query: SELECT id, name, description, price from products where price in ("7.99", "9.99","11.99"); Thanks
Pablo Caro
4,191 PointsI am also having the same issue. I too tried no quotes and with quotes. Everything I have tried is not working. select * from products WHERE price IN (7.99,9.99,11.99);
**** Leo Thanks for the help. I am currently using firefox and will change over to Chrome to see if that helps.
Leo Lanahan
22,018 PointsHi Pablo, I usually format the IN statement with spaces IN (7.99, 9.99, 11.99). But, I just ran your query "select * from products WHERE price IN (7.99,9.99,11.99);" with no problems. I think I might have changed browsers for this problem. I was on Firefox initial but now I'm using Chrome. Good Luck.
2 Answers
Bonnie Martin
13,671 PointsPrices are numbers, so they don't need quotes around them.
Leo Lanahan
22,018 PointsIt is working now. I used the query: SELECT * from products where price in ("7.99", "9.99", "11.99");
Thanks for the help.
Steven Parker
231,261 PointsBut isn't that what you tried the first time?
Nathan Tallack
22,160 PointsNathan Tallack
22,160 PointsCould you link to the video or challenge you are working from so that we can have context?