Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

General Discussion

Use an INNER JOIN to join the 'movies' and 'genres' tables together only selecting the movie 'title' first and the genre

hi guys i been stack in this challenge can someone guys help me to answer this one i use command statement like this SELECT movies.title, genres.name FROM movies INNER JOIN genres to retrieve the movies title and genres name but its give me an error this challenge has two table name movies with the column of title and genres with the column of name it should only selecting movie title first and second genre name

3 Answers

Hi Liad thanks for reply yeh i got the answer i just confuse about the question i just trying to just join the table and retrieve the table column it self joining table is looking for foreign key and primary key

Liad Idan
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Liad Idan
Full Stack JavaScript Techdegree Graduate 20,279 Points

Yes you're right, I also think that some of the questions aren't well-phrased... they had to mention that you need to retrieve only the movies with genre assigned to them.

There's might be an error in the system, I wrote the following statement several times but it always returns an error:

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

Is there anyone can help to solved it.

Thanks Pietro