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!

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


Brendan McRae
Brendan McRae
331 Points

How do I join the Media_Genres table? The instructions aren't clear and the videos aren't helping.

I'm aware my query isn't correct, but I'm not sure what the correct way to do this is. I've been stuck on this question for over 40 minutes. Help!

Edit: Somehow, my query didn't get attached to this post properly, so here it is: SELECT * FROM Media JOIN Genres ON Media.genre_id = Genres.genre_id WHERE Media.media_id=3

1 Answer

Nathan Thomas
Nathan Thomas
13,477 Points

Hi Brendan

This post helped me to correct my JOIN clauses: https://teamtreehouse.com/community/sql-excersice-bummering-you-need-to-specify-tables-on-the-join as I was having a similar issue. I needed to use multiple joins to locate related column values in all three tables. Your WHERE clause is correct.

Best, Nathan.