SQL Case File: 004

Subqueries, CTEs & Derived Tables

A recruiting report multiplies candidates because the query joins when it only needs to prove existence.

  • Answer Space: predict the SQL result before execution.
  • Problem Space: inspect tables, rows, columns, keys, and relationships.
  • Decision Space: choose the relational operations that prove the answer.