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

Marcia Haledjian
Marcia Haledjian
7,562 Points

DATABASE Join multiple tables

What I am missing here? Why is not selecting?

Challenge Task 2 of 5 In a car database there is a Make table with columns, MakeID and MakeName, a Model table with columns, ModelID, MakeID and ModelName and a Car table with columns, CarID, ModelID, VIN, ModelYear and StickerPrice. For all cars in the database, show Make Name, Model Name, VIN and Sticker Price from the Model and Car tables in one result set.

Bummer! Your query didn't select the MakeName, ModelName, VIN and StickerPrice!

➢ SELECT Make.MakeName, Model.ModelName, Car.CarID, Car.ModelID, Car.VIN, Car.ModelYear, Car.StickerPrice FROM Make INNER JOIN Model ON Make.MakeID = Model.MakeID INNER JOIN Car ON Car.ModelID = Model.ModelID;

Ford Escape 1 1 1111111111111 2014 25000.0 Ford Escape 2 1 222222222222 2015 26000.0 . . . . . .

1 Answer

Steven Parker
Steven Parker
231,140 Points

:point_right: You might be returning the wrong number of columns.

The challenge asked you to select 4 things, but your SELECT has 7 items

To get the most specific and accurate answers to your questions, be sure to always provide a link to the challenge itself.