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

Task 2 of 5 in JOIN queries challenge, getting the right data but not doing it right.

So in the second challenge where you´re supposed to join 3 tables together. As far as I´m aware, that´s what I´m doing in this challenge but í´m still getting the error that I should use two INNER JOINs despite them already being there.

This is the code I´m using.

SELECT mk.MakeName, md.ModelName, c.VIN, c.StickerPrice FROM Make AS mk INNER JOIN Model AS md ON mk.MakeID = md.MakeID INNER JOIN Car AS c on c.VIN = c.VIN AND c.StickerPrice = c.StickerPrice;

1 Answer

I just figured it out.