Skip to content
SQLFree

Turn complex business logic into readable SQL.

SQL Mastery

Move beyond basic queries with conditional logic, NULL-safe transformations, subqueries, CTEs, and analytical window functions.

What you will leave with

You finish able to structure advanced analytical queries that another data professional can read, test, and maintain.

Modules
4
Duration
~10 hours
Level
Intermediate to Advanced
Access
Free course
  • Window functions & ranking
  • CTEs & correlated subqueries
  • CASE, COALESCE & NULL mastery

What you will be able to do

What this course prepares you to do.

The curriculum is organized around these 4 practical outcomes.

Express business rules with CASE and NULL-safe logic

Clean and transform dates, text, and numeric values

Choose between subqueries and CTEs for multi-step work

Use window functions for rankings and running calculations

Course map

One connected route through SQL Mastery.

4 modules / ~10 hours

Curriculum

Every module earns the next one.

Open a module to inspect every section before you start. Your progress follows you through the course.

01
Module 1

Conditional Logic & NULL Handling

IntermediateFree

CASE WHEN - SQL's If-Then-Else, CASE for Conditional Aggregation, COALESCE - Your NULL Safety Net, and more.

View 5 sections
  1. 1CASE WHEN - SQL's If-Then-Else
  2. 2CASE for Conditional Aggregation
  3. 3COALESCE - Your NULL Safety Net
  4. 4NULLIF - Preventing Errors
  5. 5NULL in Aggregations & Comparisons
155 min5 sections
Open module
02
Module 2

Data Transformation Functions

IntermediateFree

String Functions - Text Manipulation, Date & Time Functions, Numeric Functions, and more.

View 4 sections
  1. 1String Functions - Text Manipulation
  2. 2Date & Time Functions
  3. 3Numeric Functions
  4. 4Type Conversion with CAST
125 min4 sections
Open module
03
Module 3

Subqueries & CTEs

AdvancedFree

Subqueries in WHERE, Correlated Subqueries, EXISTS & NOT EXISTS, and more.

View 3 sections
  1. 1Subqueries - Queries Within Queries
  2. 2Common Table Expressions (CTEs)
  3. 3Subquery vs CTE vs JOIN
125 min3 sections
Open module
04
Module 4

Window Functions

AdvancedFree

Introduction to Window Functions, Ranking Functions: ROW_NUMBER, RANK, DENSE_RANK, PARTITION BY - Windows Within Windows, and more.

View 4 sections
  1. 1Window Functions - The Big Picture
  2. 2Ranking Functions Deep Dive
  3. 3Aggregate Window Functions & LAG/LEAD
  4. 4Frame Specifications
165 min4 sections
Open module

Who this course is for

Built for people who need to use the skill.

Start with the background you have. The prerequisite notes above tell you exactly what is assumed.

01

Analysts who already write basic SQL

02

Data professionals preparing for advanced SQL interviews

03

Engineers maintaining reporting logic

Start the course

Begin with Conditional Logic & NULL Handling.

Module 1 introduces the language and example used throughout the rest of the course.

Open Module 1
SQL Mastery Course - Advanced SQL for Data Professionals | Free Interactive Tutorial | Let's Data Science