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 trialPablo Caro
4,191 Pointshaving issue with this query. Where clause is in the query
I am including where clause and do not see where the issue is.
> Select * from products where price >=10.99 and price<=12.99;
id name description price
1 Retro Gaming T-Shirt All your fave gaming characters on one t-shirt. 10.99
2 Generic Super Hero T-Shirt Your fave super hero is on this shirt. Wear it. 11.99
Pablo Caro
4,191 Pointsthis is from Challenge Task 1 of 2
In the e-commerce database we have the products table with the columns id, name, description and price. Find all the products in the database with the price including and between 10.99 and 12.99.
1 Answer
Jason Anello
Courses Plus Student 94,610 PointsThe query you have does produce the correct results but the error message you get mentions that there's no BETWEEN keyword. It looks like the challenge wants you to solve it specifically with BETWEEN since the previous lesson taught this.
You can review the Teacher's Notes here if you're not sure how to do this: https://teamtreehouse.com/library/sql-basics/finding-the-data-you-want/searching-within-a-range-of-values
Also, it's easier to solve with BETWEEN.
Pablo Caro
4,191 PointsThank you for your help. I agree the between is easier but I thought the lesson focus was on the AND part of it.
Jason Anello
Courses Plus Student 94,610 PointsJason Anello
Courses Plus Student 94,610 PointsHi Pablo,
Which challenge is this from?