All righty.
So we inserted 500 users.
It was kind of a behemoth of a section to get there.
Lots of ground to cover.
But now that we're there, we're back in our comfort zone.
Hopefully we're going to have a couple of exercises.
I know we have a lot of them, but this is cool.
We have a lot of data now where it was a single, you hit the return key once and you got 500 users
much easier than having to copy and paste like 20 books.
So we're going to play around with them.
And again, your data is randomized just like mine, so your tables and your results will look different,
but the queries will work the same.
So here's the first thing find the earliest date that a user joined, and all we need to see is the
date.
And also notice how I formatted it.
Pay attention to that.
It's just the earliest date.
And then the next problem.
Find the email of the earliest user.
Now, this one's tricky.
Remember how we talked about this with men and Macs way back a couple, I don't know, five, 6 hours
ago about how when you use men and Macs, you don't just get the men, you don't get the row itself.
So we had to use a subquery.
So the hint is use a subquery to find the email that corresponds to the earliest user.
Then take all the users and I want to see a table where we have a month name and then the number of
users joined who joined in that month.
So it doesn't matter what year.
We have some 2016, some 2017 most likely.
So we're not grouping by that just by the month.
So you have to figure out how you extract the month name from the date and then go from there.
Also, notice the order.
Then.
Count the number of emails or the number of users with Yahoo!
Emails, and the way that you can determine that is just if their email ends with at Yahoo.com.
So how do you do that?
Count them all and then finally calculate the total number of users for each email host.
And this one's a little bit complicated because you're basically going to be doing four different checks.
You're going to say, All right, does the email end with Gmail?
Does it end with Yahoo!
Does it end with Hotmail?
And then you need to calculate how many each end with these.
So it's a little bit complicated.
That's why I left it for last.
Hopefully you're able to get it, if not solutions coming up in the next video.
Just remember, your data is going to look different.
Don't panic if your numbers are different.
All right.
I'll see you with the solution.