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 trialRichard gt
Courses Plus Student 749 Pointsjoin queries
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.
1 Answer
Steven Parker
231,269 PointsIt looks like you copied the task instructions from a challenge. Did you have a particular question about it?
In the meantime, some general hints:
- you'll need 2 joins for 3 tables
- each join needs to be made using a column that the tables have in common
- the common columns may be different in the two joins
Richard gt
Courses Plus Student 749 PointsRichard gt
Courses Plus Student 749 PointsI am not understanding how to join 3 tables.I know two table joining please give me answer.
Steven Parker
231,269 PointsSteven Parker
231,269 PointsYou just repeat the same process for the third table. Here's a generic example:
The third table can be joined to the first table or the second, based on which one has the other common field.
Give it a try, and if you still have trouble show your entire query code so far.