Databases Querying Relational Databases Joining Table Data with SQL JOIN Queries

Looking for help on this challenge?

This is the code I used, but didn't get correct answer. I also tried other variations.

SELECT mk.MakeName, md.ModelName, cr.VIN, cr.StickerPrice AS mk FROM Make INNER JOIN Model AS md ON mk.MakeID = md.MakeID INNER JOIN AS cr ON md.ModelID = cr.MakeID;

1 Answer

Steven Parker
Steven Parker
182,603 Points

You're close, but I see a few issues:

  • the table alias "AS mk" must come after the table name
  • the last join is missing the table name (I'd guess you meant it to be "Car")
  • the Car table does not have a "MakeID" column
  • the join criteria should compare columns of the same kind

Thanks a bunch!