Interesting problem (to me, anyway). Im know I need 3 joins, but im not sure whats wrong with this. Can you help?
Have I made a mistake in the syntax of these queries?
KRIS NIKOLAISEN53,705 Points
This should make it easier to see. Your code is on top. The revised code is on bottom.
select Make.MakeName,Model.ModelName,Car.VIN,Car.StickerPrice from Make inner join on Make.MakeId = Model.MakeId inner join Model.modelid = car.modelid
SELECT Make.MakeName,Model.ModelName,Car.VIN,Car.StickerPrice FROM Make INNER JOIN Model ON Make.MakeId = Model.MakeId INNER JOIN Car ON Model.modelid = car.modelid;
Your inner joins need to include the table name to join and the keyword ON to specify what columns are joining.
ah that was a silly mistake lol.
But also, another note to your solution (so that other's don't get confused -- and it was a second mistake i made up above):
Note, Make.MakeName was not asked for in the query, and the query will not pass until it is removed.
Thanks very much for your help Chris
SELECT Model.ModelName,Car.VIN,Car.StickerPrice FROM Make INNER JOIN Model ON Make.MakeId = Model.MakeId INNER JOIN Car ON Model.modelid = car.modelid;