Lesson 1 • Introduction

Introduction: Analyzing Data with SQL

In this introductory lesson, learn what SQL is, what you can do with it, and how you can start honing your skills.

Lesson 2 • Preparation

Connecting data, tables, and creating a model

The first step in getting going with SQL is connecting your data and tables and learning the architecture for building your first model.

Lesson 3 • SELECTing

SELECTing your first data with SQL

The most basic SQL query grabs data from a table, and consists of a SELECT statement and a FROM statement.

Lesson 4 • Filtering

Introduction to filtering (WHERE)

The ‘where’ clause in SQL is a very simple way to filter out rows in your data set based on the content of it.

Lesson 5 • Filtering

Using !, =, <, > to filter data in SQL

You can use symbols like !, =, <, and > to filter data in SQL. Learn the basics of how each symbol works.

Lesson 6 • Filtering

AND / OR: Filtering your data with several conditions

Learn how to combine several conditions in your ‘where’ statement by using the statements ‘and’ & ‘or’.

Lesson 7 • Filtering

Filtering on non-exact values with LIKE

In cases where you're unable to define the conditions exactly, you can use 'like' clause to filter on values that match more or less.

Lesson 8 • Filtering

Filtering when conditions are NOT fulfilled

To filter out based on values that are not exact, you can use the 'not' statement.

Lesson 9 • Creating Columns

Introduction to columns

In this section of the tutorial, you’ll work with something new: creating new content to be included in your table.

Lesson 10 • Creating Columns

Creating a new column and naming it AS something

Apart from selecting columns from the existing data, it’s also very simple to create new columns, and name them using 'as'.

Lesson 11 • Creating Columns

Making calculations in columns

Creating your own columns in SQL becomes even more useful for business analysis when you include calculations in the columns.

Lesson 12 • Creating Columns

Using CASE WHEN as IF statements in SQL

In SQL the ‘case’ statement functions the same way as the 'if' function in Excel.

Lesson 13 • Aggregating Data

Introduction to data aggregation

This lesson introduces data aggregation. More specifically, you'll learn what to expect in this chapter and how to aggregate data.

Lesson 14 • Aggregating Data

Using COUNT, SUM, AVG, MIN, and MAX

COUNT, SUM, AVG, MIN, and MAX are the SQL functions you'll use most for aggregating data.

Lesson 15 • Aggregating Data

GROUP BY and ORDER BY

GROUP BY and ORDER BY help you summarize the results on a level in between looking at all the rows in a table and only looking at one.

Lesson 16 • Aggregating Data

Avoid failing queries with aggregate functions and GROUP BY

Learn to avoid the common causes of fails when using aggregate functions and GROUP BY.

Lesson 17 • Sub-queries

Introduction to sub-queries and CTE

Sub-queries and CTEs are ways to create temporary tables than can then be treated in a separate step in your query.

Lesson 18 • Sub-queries

WITH

The SQL WITH clause is a CTE that allows you to create a temporary table which you can then treat in a separate step in your query.

Lesson 19 • JOINing

Introduction to JOIN

Introduction to the JOIN function. Learn how to increase the width of the resulting table by adding columns from other tables.

Lesson 20 • JOINing

Finding Common Identifiers & Choosing your Primary Table

Joining tables in SQL requires you to have a common identifier between tables A & B. Learn how to find it.

Lesson 21 • JOINing

Using the JOIN function to combine tables

Joining tables is a way to get data from multiple tables in your SQL query. This is great if you want to query data on separate tables.

Lesson 22 • JOINing

Combining CTEs with JOIN

Combining CTEs with JOINs allows you to have an even greater level of data to analyze, without unnecessarily overloading your query.

Lesson 23 • Conclusion

What’s next? Start analyzing your own business data

Congratulations! You've made it through our SQL tutorial. The next step is to start analyzing your own business data.

Lesson 24 • Tips & Tricks

The order of the elements in your query

In order for your SQL query to return any results, your functions should follow a specific order. Learn what that order is in this lesson.

Lesson 25 • Tips & Tricks

LIMITing the amount of data with SQL

Limiting the amount of rows your SQL query returns is a nifty way to see an excerpt of your query's results (or to see if it has no errors).

Lesson 26 • Tips & Tricks

Best formatting practices

Learn the various different ways you can format your SQL code to improve readability and understandability.

Lesson 27 • Tips & Tricks

Documenting your code

Documenting your code ensures that you and others can go back and understand what the code is doing and how it’s structured.