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 Creating and Modifying Database Tables Creating and Modifying Database Tables Making Changes to a Database

Peter Chukwukelu
PLUS
Peter Chukwukelu
Courses Plus Student 833 Points

SELECT md.ModelName, ca.VIN, ca.StickerPrice FROM Model AS md INNER JOIN car AS ca ON md.ModelID, md.MakeID = ca.CarID;

Please help me write the syntax correctly for this database information: In a car database there is 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 Model Name, VIN and Sticker Price in One result set.

1 Answer

Steven Parker
Steven Parker
231,272 Points

There should not be a comma in the "ON" clause. And make sure that the terms you are comparing in the two tables contain the same data.