So we inserted all of our data.
We have our schema ready in our tables created.
Now let's get down to business.
Let's do some stuff with it.
So I'm going to break every problem that I'm going to give you.
There's quite a few here into it's own video.
Hopefully I'll make them a bit more manageable and you won't want to go to sleep or drown yourself after
watching it.
So the first thing that you'll see here the format of these is that I'm going to give you the results.
It's much easier just to give you a picture of them rather than trying to describe a bunch of text with
what it actually means.
It's much easier to show you.
So first thing I should say is that these results are truncated.
These are only for the first 15 or so used limit.
But I want results for everything it's just too hard to fit them onto the screen would be very very
tiny.
But the key thing is that we have a title for a movie or excuse me for a series and a corresponding
rating.
So we're going to need to join those tables together.
We need to join the series table with the reviews table because right now they're not in the same table
we're storing the titles separately from the ratings.
So let's do this now we'll go over to cloud nine and the first thing we'll do is just start simple.
We'll select star and we'll just start from series which we've already done.
Just like this one thing I should highlight before we go too far.
I did deliberately add some series that don't have any reviews so that nobody has rated them yet and
that was deliberate so that we can work with that later.
However in this example I only want to see movies.
I keep saying that we want to see the titles of series that have been rated so we don't have any Knolles
in here which is a bit of a hint.
So select star from series and on its own we get this.
Now what we want to do is join.
So if we do a separate select to start from previews
we want to join.
Basically where this ID of the series is the same as the series ID.
So these first five here one two three four five correspond to Archer which is what we see here.
So to do that we don't need to separate selects you energy select star from Sirius.
Well do join with reviews on.
And where do we want would you want to join on series.
Dot ID equal to revues dot series underscore ID just to reiterate where this idea of the series actually
is going to be easier if I do it here.
Where this series ID is equal to this idea of the series table OK and all we want are title and rating.
We'll start with just getting everything and lets see if were in business yet.
Well its a little hard to tell because we have this formatting issue where we have so much data.
Things are being cascaded over but if we look closely we can see okay we have Archer 8.00 Archer seven
point five or eight point five and so on and if we scroll down you can see that not every single TV
show is here.
You'll notice the IDs jump seven eight nine General Hospital 10 and catch fire.
Then it goes up to 13 so whatever.
11 and 12 are we don't have any reviews so that's good not that we don't have reviews that's not good
but they're not showing up which is what we want.
So now we'll just whittle this down to title and rating.
And that's all we want and I'll format it a little bit nicer.
Here we go hit enter and now we get all of our data on the left side.
We have title on the right side.
We have corresponding ratings.
So hopefully what we just did there seemed relatively similar to what we did in the last section where
we're writing these joints what will build up to in this section is doing a double join where we have
another joint statement because we want to connect all three of our tables.
But for now we're working with one table or two tables at a time.
OK.
So we're done with that one.
I mean just put a comment up here.
First let me just do challenge one.
Now we'll move on.
Next video we'll pick up with challenge to.