Bummer! This is just a preview. You need to be signed in with a Basic account to view the entire video.
Start a free Basic trial
to watch this video
In this video we'll take a look at what we're going to cover in this course.
-
0:00
[MUSIC]
-
0:04
Hello and welcome to your next exciting step in your SQL journey.
-
0:09
I'm Andrew a database user, lifelong learner and teacher here at Treehouse.
-
0:14
In this course we're going to build on that foundation of
-
0:17
knowledge you've already acquired.
-
0:19
You should be familiar with performing simple select statements and
-
0:23
filtering using WHERE clauses.
-
0:25
If you don't understand what any of that means you should check out the course
-
0:29
prerequisites, I've listed them in the teachers notes below.
-
0:32
SQL databases can store massive amounts of data, getting the information you want and
-
0:39
presenting it in a human readable and digestible way is a necessary skill for
-
0:44
anyone needing information from a database.
-
0:48
Let's think of a couple of ways that you'd want to retrieve data in a database.
-
0:55
Imagine you wanted to present products to a user of an online store
-
0:58
alphabetically by name.
-
1:00
You'd do this by retrieving that information from the database,
-
1:04
in a specific order.
-
1:05
Or you might want to display all products by price
-
1:09
from the least to the most expensive, for example.
-
1:12
Again, you'd request the data in a specific order.
-
1:16
If you run a news site,
-
1:17
you may have thousands of news stories going back tens of years.
-
1:21
Your readers don't want all of those stories, so
-
1:24
you'll only request the latest articles from the database.
-
1:27
Limiting what you retrieve is very helpful,
-
1:30
especially when your database holds lots and lots of data.
-
1:34
Data can be inconsistent, especially when end users are involved, so
-
1:39
being able to manipulate strings of text and make it consistent is super important.
-
1:45
Maybe you want to make all emails lowercase and last names uppercase.
-
1:50
Instead of just looking at individual rows in a table
-
1:53
you may want to group them together and ask questions about them.
-
1:57
For example, you may want to count all products bought on a certain day or
-
2:02
maybe you want to get the total amount of revenue generated by sales.
-
2:06
You can even get the maximum or minimum review ratings for a product.
-
2:11
Grouping data like this is called aggregation.
-
2:15
Then there's reporting tools for dates.
-
2:17
SQL code provides tools for creating dates and searching by dates.
-
2:22
These come in handy when you're looking at ranges of dates.
-
2:25
For example, say you wanted a report showing all sales in the last seven days.
-
2:31
Using SQL, you simply retrieve all records from seven days ago to today.
-
2:36
This kind of dynamic reporting is very useful.
-
2:39
This same SQL query can be run everyday to return just the latest results.
-
2:46
In this course we're going to take a look at all the different coding tools
-
2:50
that the programming language of SQL has to offer.
-
2:53
By the end of this course you'll be able to generate database results suitable for
-
2:58
reports, or even a dynamic website.
-
3:01
Whether you're an analyst, scientist, marketeer, support staff, or
-
3:04
developer, this course is for you.
You need to sign up for Treehouse in order to download course files.
Sign up