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

Ethan Martin
PLUS
Ethan Martin
Courses Plus Student 1,883 Points

Select multiple columns from multiple tables in a specific order.

I want to select the title of the movie, then the rating, then the review

SELECT title, rating, review FROM movies, reviews WHERE movies.id = reviews.movie_id;

How can I make this work?

Ethan Martin
Ethan Martin
Courses Plus Student 1,883 Points

Where Title comes from the movie table, and rating and review comes from the review table.

1 Answer

Steven Parker
Steven Parker
231,269 Points

The query you show above performs a "join" using the comma syntax. Doesn't it produce the correct result?

Ethan Martin
Ethan Martin
Courses Plus Student 1,883 Points

I think I was just getting ahead of myself. I'll study up on that topic and get back to you guys to see what I messing up on.