You already know how to write a SELECT. That is not what this module is for.
This module is about the handful of SQL behaviours that produce a plausible number that is wrong, and that survive code review because the query looks fine. Every one of them is also a standard interview question, because interviewers know they separate people who have shipped data pipelines from people who have written queries.
Four of them account for most of the damage:
NULL is not a value, and comparing to it doesn't do what it looks like it does.SUM will not tell you it happened.COUNT(*) and COUNT(col) are different questions.The fourth is the one that ends careers quietly, and it's specific to the warehouse this course's QuickSight track sits on top of.
SQL will not error when it is wrong. It will return a number.
A COMPILER SAYS SQL SAYS
┌──────────────┐ ┌──────────────────────┐
│ type error │ │ 4,182,309.44 │
│ line 12 │ vs │ │
└──────────────┘ │ (this is wrong, but │
│ nothing will say so)│
└──────────────────────┘
Which means correctness in SQL is not something the tooling gives you. It's something you assert, deliberately, with checks you write yourself. That habit is the actual subject of this module.
NULL returns, including in IN, NOT IN, joins, and
aggregates — and explain three-valued logic out loud.COUNT(*), COUNT(col) and COUNT(DISTINCT col) and justify it.| # | Lesson | Read | Listen |
|---|---|---|---|
| 1 | NULL and three-valued logic | 24 min | 9 min |
| 2 | Joins and the fan-out problem | 26 min | 9 min |
| 3 | Counting things correctly | 24 min | 8 min |
| 4 | Deduplication and top-N per group | 26 min | 9 min |
| 5 | Redshift is not PostgreSQL | 26 min | 8 min |
Then: Cheat sheet · Lab · Quiz · Interview questions
Examples are written in standard SQL and verified against the PostgreSQL documentation, because it is the most precisely-specified widely-available reference and Redshift derives from it.
Lesson 5 is entirely about where that assumption breaks. Amazon is explicit about not making it:
"Do not assume that the semantics of elements that Amazon Redshift and PostgreSQL have in common are identical." — Unsupported PostgreSQL features (verified 2026-08-12)
Where behaviour differs across Redshift, Athena/Trino, and Spark SQL, the lesson says so. Where I could not verify a dialect's behaviour from documentation, the lesson says that instead of guessing.
"Amazon Redshift will no longer support the use of Python UDFs after June 30, 2026. We will start enforcing it in phases." — banner on Unsupported PostgreSQL features, read 2026-08-12
That date has passed. If you have Python UDFs in Redshift, enforcement is in progress now. See the AWS blog post for migration options. Lesson 5 covers what to do about it.
Facts verified 2026-08-12 against the pages cited in each lesson.