AiTeky Original Interactive Learning & Practice Intermediate
SQL: join fan-out, NULL traps and the revenue report that was too high
See why joining an order to its items repeats the order's amount, how NULL breaks comparisons and counts, and fix a revenue report that comes out far higher than the finance total.
SQL answers questions about tables, and two quiet traps give wrong answers that look right: a join that multiplies rows (so a sum counts the same amount several times) and NULL, a missing value that is neither equal nor unequal to anything. Neither produces an error message. The report just shows a number that is wrong.
This course runs real SQL on a small in-memory database in your browser, so every result you see is a real result. Check your database's documentation for exact syntax and NULL rules, which vary slightly between products. All data is made up.
- Learn lessons explain one idea at a time and let you run it.
- Industry ready lessons decide and justify, and end with interview questions.
No SQL experience is assumed. Basic Python helps.
- ▶ Run code in your browser. Nothing to install
- ✓ Exercises that check themselves
- 📖 Tap a word to see what it means
Locked. Sign up free
Learn
Understand each idea with everyday examples. No coding background needed.
- 01 25 min Free sample 🔒 AiTeky Pass When a join repeats a row Join orders to their items, watch the order amounts get counted once per item, and fix the sum by adding up each table at its own level.
- 02 25 min 🔒 AiTeky Pass NULL is not a value See how NULL breaks equality, counts and NOT IN, and write the checks that handle a missing value on purpose.
Industry ready
Real problems from real jobs, and the questions interviewers ask about them.

