COUNT

0001-01-01

COUNT(*) After a JOIN Counts Rows, Not Things

After a JOIN, COUNT(*) counts the rows in the intermediate result — which is not the same as counting the distinct entities you care about. The wrong number is plausible, which makes it dangerous.