Why does this SQL update lose rows?

Why does this SQL update lose rows in a batch job. The SQL code updates a table using a join without a stable key, so duplicate matches overwrite the wrong rows. In SQL pipelines this silently corrupts data.

#whatswrongwiththissqlquery #sqlbug #sqlproductionbug #sqldebugging #sqldatabase #sqlcodereview #sqlperformance #sqlreliability #sqlanalytics #sqldataintegrity #sqlengineering #sqlupdatebug #sqljoin #sqldat...

https://www.youtube.com/watch?v=3qc8B1Hs3s4

Why does this SQL update lose rows? #sqlbug

YouTube