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 trialElsie Martinson
2,704 PointsCan't get past Task 2 of 4 - Querying Relational Databases
In a car database there is a Sale table with columns, SaleID, CarID, CustomerID, LocationID, SalesRepID, SaleAmount and SaleDate and a Car table with columns, CarID, ModelID, VIN, ModelYear and StickerPrice. Use a subquery along with IN to list all sales of cars with Sticker Price greater than $30000. Include all columns.
It says that I am "missing the IN keyword" even though I have it in there.... wondering if this is a glitch in the system or if my code is incorrect?
1 Answer
KRIS NIKOLAISEN
54,971 PointsThis is very similar to the first task. The following passed task 2:
SELECT * FROM Sale WHERE CarID IN (SELECT CarID FROM Car WHERE StickerPrice > 30000)
Farai Tanekha
10,669 PointsFarai Tanekha
10,669 PointsThank you Kris :)