SQL Tutorial: Introduction to data driven decision making

Irena Ortner, Prof. Bart Barnsten, and Prof. Tim Verdonk teach SQL for business decisions using a MovieNow rental database. You'll learn advanced OLAP functions like CUBE and ROLLUP to track metrics: revenue, customer ratings, active users. The course connects data queries to real decisions, from monthly revenue to regional growth planning.
Chapters
Welcome to this course on Data Driven Decision Making. My name is Irena Ortner and together with Professor Bart Barnsten and Professor Tim Verdonk, we will guide you through this course. We assume that you are already familiar with basic SQL queries. Still, we will quickly refresh some basic SQL statements and you will learn how you can apply them to extract valuable business insights from your data. Then you will learn about new SQL techniques to summarize data such as the SQL OLAP extensions, the Cube rollup and Grouping sets operators, which are specifically developed as business intelligence tools. Throughout this course, we will work with the Postgres database from a fictional movie rental company called MovieNow. MovieNow offers an online platform for streaming movies. Customers can rent a movie for 24 hours for all movies. The company stores additional information such as the genre or the main actors. MovieNow also stores information about customers and movie ratings. Here we will give an overview of the tables in the database. First, in the Customers table we have a column Customer id, a number which is a unique identifier for each customer. Then we have name, country, gender and date of birth. The final column is the date when the account for movienow was created. The columns from the table Movies include a unique identifier movieID, the title of the movie, the movie genre, the runtime, the release year, and finally what it costs to rent the movie. The table Renting records all movie rentals. RentingID is a unique identifier for each movie rental. The column Customer ID tells us which customer rented the movie and Movie ID tells us which movie the customer rented. The rating a customer gives after watching the movie is stored in the column Rating which has values between 1 and 10, where 10 is the best rating. The final column is the rental date. The table Actors contains information about the actors in the movies. Beside the unique identifier ActorID, we have the actor's name, year of birth, nationality and gender. The table acts in shows which actor appears in which movie. Besides, the unique identifier acts in id. It includes Movie ID and Actor id. Data driven decision making achieves short term and long term goals. We can extract valuable information from the data to support operational short term decisions. For example, the popularity of certain actors helps movienow decide whether to purchase certain movies. Also, last month's revenue can be important information supporting decisions regarding short term investments. For long term decisions, Data driven support can provide information regarding customer growth and successes in certain regions in the past which can inform company decisions regarding when and where the market can be expanded in the future. Also, knowing the long term development of overall revenue helps movienow plan long term investments. Key performance indicators help a company or its subdivision define and monitor success. Revenue is a trivial indicator of success for movienow. This is calculated as the sum of the prices for rented movies for the subdivision. Customer Relations Management the KPI Customer satisfaction could be quantified by the average rating of all movies or the KPI Customer Engagement as the number of active customers in a certain time period. In this course, you will learn how to define KPIs, extract information from the data and monitor it over time. This will help decision making using hard facts. Now you can start exploring the data.
More from Richie

#359 My Best Friend is AI with Valerie Tiberius, Professor of Philosophy at University of Minnesota

How AI Agents Will Work While You Sleep | Ruslan Salakhutdinov, Professor at Carnegie Mellon

#358 How AI Agents Will Work While You Sleep | Ruslan Salakhutdinov, Professor at Carnegie Mellon







