Next up, we have a third challenge.
This time we're working with the reviewers table and the reviews table.
So what I want us to do is match up every reviewer's first and last name with any review they have made.
We'll see the rating.
So Thomas Stoneman left an 8.4 something we don't know what yet and an eight one for something else.
A seven for something else.
7595 for something I want.
First name and last name of every reviewer matched up with any rating they have left which would be
stored in the reviews table.
So let's go ahead and try it.
We're going to need a join we're going to join the reviewers with reviews, those two tables.
We won't worry about series because there's no series information here.
Okay.
We'll start with a select first name and the last name from reviewers, of course.
And I'll put the ID in there as well.
Just to start, I run this and we see our seven reviewers Thomas Stoneman, Wyatt Skaggs, Kimbra Masters,
one down to seven four their IDs.
And we are going to match up those IDs from the reviewers table with the reviewer's ID from the reviews
table.
It's kind of confusing having reviewers and review.
Maybe users and reviews would have been simpler or less confusing.
But either way, we have these two tables.
I want to match up this idea of one with this review that has a reviewer ID of one and so does this
one, and so does this one.
And then I want to take the rating from each of those once I join them together.
So I'm going to do a join.
I'll take ID first name, last name from reviewers.
Join reviews on where the reviews dot reviewer.
ID is equal to the reviewer to her ID.
If you struggle to understand this, just pause and walk through what is this in an actual row of a
table?
And what is this?
And compare them.
It's a lot of review.
Review or reviewer.
It's confusing, but we're just matching up where the ID from the reviewer matches with the reviewer's
ID in the review table.
Oh, what a nightmare to say that out loud.
And instead of just doing ID, first name and last name, let's do Star to begin with.
And of course it's reviewer's ID.
I hope you saw that before me.
Okay.
Now we see every time there is a match between the reviewer ID and the reviews reviewer ID one and one
or two and two, six and six.
We see it all alongside and that's great.
That's what we want.
Our two tables joined on that intersection.
The user or reviewers ID matching what we stored in the actual reviews table.
But all we want is first name, last name and rating.
So let's slim that down.
First name, last name and rating.
Try it again, and this should get us there.
Looks good.
All of Thomas Donovan's ratings, all of Wyatt Skaggs ratings can remasters.
And that's what we were supposed to do.
Of course, I limited it to as many could fit in the screenshot, but I want all of them and we are
getting all of them here.
All right.
Next up, yet another challenge.