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

Development Tools

Database Fundations - Challenge - Joining Tables and Alising

Joining Tables and Alising.

Its asking me to joining two tables. So far I have this code, but I can't pass it from the first one. Can anyone help me please.

SELECT movies.title , genres.name FROM movies INNER JOIN genres ON movies.title = genres.name;

1 Answer

Hi Daniel,

You put data into the movies title and genre name but these two columns don't have records, it is better to join same table.

See example below, you will find two IDs match on the end, notice "genre_id = genres.id"

SELECT movies.title, genres.name FROM movies INNER JOIN genres ON movies.genre_id = genres.id;

Video @ 1:07 : Database foundations

Hope that helps

Thank you a lot, know I see where I had the problem.!