
When JOINs duplicate rows: The mismatch between procedural thinking and set-based operations
The query executes cleanly without syntax errors, but reported order totals suddenly multiply compared to official ledger records. Behind this silent discrepancy lies row duplication, a direct outcome of treating JOIN as a simple column append rather than an operation generating an entirely new dataset.





