Rainbow Deals - hours only!Up to 80% off on all courses and bundles.-Close
How to query more than one table
2. Get to know the tables
Creating JOINs
Referencing columns
Let's practice


Before we start, let's explain the data sets we're going to work on.

Remember the table car from Part 1? We're going to use it now together with another table called person. We'll show you all the examples in this part based on these two tables.

We'll have cars (table car) and their owners (table person). We know the owner of the car because we have the column owner_id in the table car which contains an id from the table person. Easy, right?

Take a look at the columns the tables contain:

person (id, name, age);

car (id, brand, model, price, owner_id);


In case you're already fed up with the cars, we've created a new set of data for all the exercises in this part.

We're going to work with movies and their directors.

Open the Database tab on the right and study the tables. Think about the following question: how do we know who directed a specific movie?

When you're done, simply click Next exercise and we'll tell you the answer.