Joins II — fan-out & grain
Concept  ·  SQL & Querying

A missing ON (or comma join) produces a Cartesian product — every row times every row.

The comma-join is ancient valid syntax for 'Cartesian product', and a dropped ON in explicit-JOIN style degrades to the same thing in some engines (or errors in stricter ones — the errorless path is the trap). Small tables make it look like duplication; big tables make it look like an outage. The tell in results: every combination present, counts equal to the product of the sides.

See it break
lanes
lane
L1
L2
L3
throwers
throwerlane
AdaL1
BenL3
The trap
SELECT
  l.lane,
  t.thrower
FROM
  lanes l,
  throwers t ORDER BY
  l.lane,
  t.thrower;
The fix
SELECT
  l.lane,
  t.thrower
FROM
  lanes l
  JOIN throwers t ON t.lane = l.lane
ORDER BY
  l.lane;
The trap
L1Ada
L1Ben
L2Ada
L2Ben
L3Ada
L3Ben
The fix
L1Ada
L3Ben

The league sheet paired every thrower with every lane — a comma join with no ON produced all 6 combinations, not the 2 real assignments.

The rule

Explicit JOIN ... ON always; comma-joins banned by convention; when a Cartesian product is meant (a spine × entities scaffold), write CROSS JOIN so the intent is loud.

Shows up elsewhere
Fan-out before aggregateDate spine generation
Try one →Prove it in practice →