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.

Development Tools Database Foundations Joining Relational Data Between Tables in SQL Joining Tables and Aliasing

title first and genre name second, database foundations

In the challange task 1 of 2, the last challange in the database foundations it says i do not select the movie title first and the genre name second.

But I do. I even used the long notation for the columns although it would not be needed.

You shall not pass, it says. But I certainly believe it is wrong. Or do i miss something?

SELECT movies.title, genres.name from movies join genres on genre_id =id

1 Answer

I suspect the error the challenge gives you is misleading. In the prior video, Andrew says that both movies and genres contain a column named id. You are right that you don't need to use the long form if the column name is unique, but if it exists in both tables you must specify which you mean.

Thank you very much - again!