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

General Discussion

Database Basics - Joining Tables and Aliasing Challenge 1 of 2

I cannot figure out the answer to this challenge. It seems relatively easy compared to the challenges in the previous lessons, but the error message I am getting is not helpful whatsoever. Does anybody have the correct answer?

Hi Anthony - Can you please paste the challenge question as well as the code you are entering? You can post code using Markdown so it displays correctly. There is a link to the Markdown Cheatsheet right below the comment box.

Challenge question - We have a 'movies' table with a 'title' and 'genre_id' column and a 'genres' table has an 'id' and 'name' column. Use an INNER JOIN to join the 'movies' and 'genres' tables together only selecting the movie 'title' first and the genre 'name' second

My answer - SELECT * FROM movies JOIN genres ON movies.title = genres.name;

2 Answers

Challenge question - We have a 'movies' table with a 'title' and 'genre_id' column and a 'genres' table has an 'id' and 'name' column. Use an INNER JOIN to join the 'movies' and 'genres' tables together only selecting the movie 'title' first and the genre 'name' second

My answer - SELECT * FROM movies JOIN genres ON movies.title = genres.name;

Hi Anthony - It is asking you to only select the movie title and genre name, but you have used * to select all. Also, even though using just JOIN will work, it would like you to specify INNER JOIN. I would suggest watching the video again to make sure you have a good grasp on it before moving on. Good luck!