Lesson 4.1 · Pro

WITH: build a query one step at a time

Name each step of a query with a CTE so it's easy to read, check and change.

In this lesson

  1. Name a step with WITH
  2. Chain several steps
  3. Turn a nested query into CTEs
  4. When a short IN (SELECT ...) is fine