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

challenge 1 of 4 in querying relational database impossible to answer

link to the query: https://teamtreehouse.com/library/querying-relational-databases/subqueries/subqueries

I have written the following sql code:

SELECT m.ModelName, c.StickerPrice FROM Model AS m INNER JOIN Car AS c ON m.ModelID = c.ModelID WHERE c.StickerPrice IN ( SELECT StickerPrice FROM Car WHERE StickerPrice > 30000 );

This code works fine in the sql playground but gives me a : " Bummer! The subquery doesn't return all ModelIDs for cars with the sticker price greater than 30000."

Can anyone help me please???

Joel Bardsley
Joel Bardsley
31,249 Points

Hi Bernt, I've just answered this question in this thread if you want to take a look.