Moving on along to our next topic.
Yes that's OK.
Moving on along I'll keep using that.
Our next topic here is ORDER BY.
So as the subtitle tells you it's how we can sort our results which is something that we all want to
do.
Hopefully you see why that's useful when you're trying to understand things.
It's good to be able to sort your data.
So with our books for instance right now we're getting them all in the order that they were inserted
in and maybe we want to do things like find the best selling books or the worst selling books or find
the most active users on our Web site at least active users or something similar.
Find the most uploaded posts or the post that has the most comments on our blog or whatever we're working
with.
It's important to be able to sort things.
And again the way we do that is by using ORDER BY.
So let's take a look at an example.
Here's a query that's going to select all the author last names from books.
So up until this point nothing is new.
So like the author last name from book books.
But after that we add on this little thing.
Order space by.
That's something that trips me up by the way that there is a space.
Sometimes it feels like it should be one word or there should be an underscore but there is a space
or space by and then what do we want to order it by by the last name.
So let me show you if you.