AITeky Learn

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.

Locked. Sign up free

Learn

Understand each idea with everyday examples. No coding background needed.

  1. 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.
  2. 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.

  1. 03 30 min 🔒 AiTeky Pass On the job: the revenue report that was too high A monthly revenue report shows far more than finance does because it joins two child tables. Reproduce the inflation, compare four fixes by effort and risk, choose, and write the note.

We use essential cookies to run the site. With your permission we also set one anonymous ID to count unique visitors, and analytics cookies to see which pages help learners. Cookie notice

Join AiTeky Learn. It's free.

Create a free account to track your progress, save items for later and get study suggestions.

Sign up free Log in