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

Databases

Alfredo Prince
Alfredo Prince
6,175 Points

Whats wrong with this query??

Along with the People table, we also have a Media table with media_id, title, img, format, year and category. To JOIN "many" media items with "many" people, we use a Media_People table which contains a media_id to link to the Media table and a people_id to link to the People table. Modify your SELECT to pull Media title for all items that are linked to People with the last name "Tolkien"

Simon Coates
Simon Coates
28,694 Points

There's a way to attach requests for help to the challenge they came from. Otherwise, you can include a link in the request for help. It's easier for people to help you if they can test their solutions.

Steven Parker
Steven Parker
231,261 Points

What's wrong with WHAT query?

It looks like you just pasted in the challenge question without sharing your query.

1 Answer

Steven Parker
Steven Parker
231,261 Points

Without seeing the query the challenge started you with it's hard to be sure, but from the description it sounds like you want something like this:


:warning: SPOILER ALERT


SELECT m.title FROM Media m
    JOIN Media_People mp ON m.media_id = mp.media_id
    JOIN People p ON mp.people_id = p.people_id
  WHERE p.last_name = 'Tolkien';