SQL for Data Analytics · SQL for Data Analytics
SQL for Data Analytics
Before we get into any specifics, this video shows you the view: what doing data analytics with SQL actually looks like, and what you'll be able to do by the end of the quarter.
SQL for Data Analytics18 min
These are just for you. They aren't graded or turned in. Answer first, then open mine and compare.
Describe the business model of Northwind Traders in your own words. What are the main entities involved? How does their business work?
How I'd answer it
Northwind is a mid-sized company that sells food products to customers around the world. They don't make the products. They source them from suppliers, and they sell them on.
A customer places an order with one of Northwind's employees. That order can have a lot of different products in it. Then Northwind works with a shipper, think of something like FedEx or UPS, to actually get the order to the customer.
So the main entities are customers, orders, the products on those orders, employees, suppliers, and shippers. The database keeps records on all of them.
Why is it important to refine broad business questions into more specific, data-driven questions?
How I'd answer it
Because the broad question can't actually be answered. "Which products are doing the best?" sounds simple, but best by what? Units sold, revenue, profit, growth? Over what time frame? Including brand new products or not? Each of those choices gives you a different answer.
A computer has no context. It needs to be told exactly what information you want, where it comes from, and what to do with it. So part of the job is getting from the vague thing the business asked for down to a specific question the data can answer, and picking the version that actually helps them with their goal.
You're going to spend most of this quarter inside Northwind's database, so it's worth getting to know it. In the video I walked through the diagram. This is the real database, running in your browser. Click through the tables and look at what's in them.
Look around
Before you click anything: which of these do you think records what was in each order? Then click around and see what Northwind actually keeps.
Loading the database…
A database is really just an organized collection of a lot of information. If Northwind didn't keep all of this, our job would be a lot harder. Because they do, questions like "what sold the most this year?" have an answer sitting in there somewhere. We just have to ask for it correctly.
Doing data analytics with SQL comes down to two things.
Asking the right questions. Figuring out which specific question will actually help the business with what they're trying to do.
Asking the questions right. Putting that question in a form the database can understand. That's what a query is, and it's what most of this course teaches.
The first one is where people underestimate the work.
Try it
The boss asks: “Which products are doing the best?” You have to decide what that means. Make your choices and watch the answer change.
“Best” means…
Over what time frame?
Loading the database…
See the query that answered it
You don't need to understand this yet. By the middle of the quarter you'll be writing it.
In my opinion, this job isn't really about the technical skills. You need them, because you can't do the work without them. But what separates somebody who can use the tools from somebody who's really good at this is being able to take a fuzzy request, break it down, and figure out what to ask.