The Analyst / SQLAll lessons ↗
Day 24 · SQL mastery path

Anti-joins

A LEFT JOIN with a NULL check finds rows without a related record.

01 · Learn

Study the pattern

A LEFT JOIN with a NULL check finds rows without a related record. Predict the output before running the example.

SELECT c.customer_id,c.name FROM customers c LEFT JOIN orders o ON o.customer_id=c.customer_id WHERE o.order_id IS NULL ORDER BY c.customer_id;
02 · Recall

Explain it from memory

What does today's SQL feature do, and when would you use it?

03 · Practice

Run SQL in your browser

Run the example, then modify one clause and predict how the result changes.

Loading SQL engine…
04 · Repeat

Consolidate the skill