Databases Querying Relational Databases Joining Table Data with SQL JOIN Queries

David Corrales
David Corrales
4,646 Points

This one seems so puzzling! I have already inserted 2 INNER JOINS, what else?!

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.

Type in your command below, then press Ctrl-Enter.

Bummer: You need to join 3 tables, you need to use two INNER JOINs

SELECT mk.MakeName, md.ModelName, ca.VIN, ca.StickerPrice FROM Make AS mk INNER JOIN Model AS md INNER JOIN Car as ca ON mk.MakeID = md.MakelID = ca.CarID;