 Now that we've seen how to do simple descriptive statistics, how easy it is to do some grouping, I want to show you how to join different tables. We've just been working with a single table, but what if we want to join them? So in our new cell, Escape, Enter or Return, two pound signs, there we go, two pound signs, and I'm going to say joining. So we're going to join two tables together. First of all, let's create two tables to join and just to make it really very illustrative. Let's create two tables. I'm going to call the one left table and the other one right table, as I say, just for clear demonstration purposes. So my left table is going to be a table. I've already done all my importing, so I'm just carrying on. I'm going to have the ID column that we created, that computer variable that contained the list object that we created, ID and age, and the names are going to be, I'm going to use symbol notation ID, and let's do age. There we go. And I'm just going to set a primary key. I've got to set my primary key, and my primary key is going to be the ID column. And let's have a look at what this left table would look like. There we go. We see the 10 rows. The ID was 1 through 10, and we see the ages there that were created, and we see ID there is in bold, the column name, the variable name, and that is our primary key. So let's create the right table. And the right table, let's just go through a few things. I'm going to use table table function. Let's make, use the collect function this time from 1 to 15. And the second one, let's round off. So it's round dot each of the element. I want it to be rounded to 16-bit integers, and what I want rounded is, what I want rounded here is random values from a normal distribution with a mean of 100, standard deviation of 20, and I want 15 of these. And then I want the names to be, I want the names to be ID. Let's make that ID, and let's make that one CRP. And primary key, the primary key, very important that has to be ID. There we go. We see ID 1 through 15, and we see these integers taken from a normal distribution. So let's have a look what happens when I join these. I'm going to use the join function, and I'm going to say left table, which is my first argument, left table, and then right table. Let's see what happens, table. And there we go. We note that what was in the left table, which was just 1 through 10, is the only ones included in this, in doing this, this way around, stating left first and then right. Let's just contrast that to joining up the right table and the left table, right table and left table. And now what's going to happen, we see again the 1 through 10, and we see just CRP is listed before age, but it's the same subjects in each of these two that are combined. So the default is just that it would look for rows which are comparable by the primary key, which is ID, and in which values exist in both of these tables. So in 11 through 15, there were no values in the column up here. If we look at this, it just had age from 1 to 10. So there's no age, there's no 11 through 15 with ages in the left table. So they will not be included there. It's only where you have values for both, when you have values for both. Now let's have a look if we do what is called a left join, which is actually what has happened. So if we do join, and we say left table, join, we say left table, and we say right table, and we specify now how the join should happen. So we're going to say how equals a left join. And we use symbol notation there, and we see exactly the same thing. So it looked at the left table, and it would only draw things into this combination based on what is inside of the left table. Now have a look if we do an outer join. So I'm going to say join again, join, and we are going to have left table, left table, and we're going to have right table, and now the how is going to equal outer. An outer join means it's going to do combine both of these, even if no values exist on either side. So if we look at 11 through 15, there were no age values for those. So it's just going to put in an NA, not a number, an NA value, missing value, in these, and that would be an outer join. So there's one more join I want to show you, and that is the anti. So I'm going to say join again, we're just going to join. But look at this, I'm going to say right table first. So right table comes first, then left table, and then I'm going to say how equals, and I remember my colon anti. And now what's going to happen, it's going to take whatever was not there. So it takes the right table first, whatever you list first, it then looks at the left table and see whatever is not combined, what I cannot combine, I'll put those together. If I put left table first and then right table, there'd be nothing. It would be an empty set that would be no rows whatsoever, only my two columns and no rows. So play around with these, with the joins, and move left and right around, and clearly see what happens when you, when you do play around, when you do move them and you do use different joins until you become used to how to join these tables. And that is what makes JuliaDB so powerful to join different tables based on your primary keys.