Why does this SQL counter lose updates?

Why does this SQL counter lose updates under concurrency. The SQL code reads then writes without locking, so concurrent increments overwrite each other. In SQL services this undercounts events.

#whatswrongwiththissqlquery #sqlbug #sqlproductionbug #sqldebugging #sqldatabase #sqlcodereview #sqlperformance #sqlreliability #sqlanalytics #sqldataintegrity #sqlengineering #sqlracecondition #sqlcounterbug #sqlcon...

https://www.youtube.com/watch?v=_Al7OSnYuPM

Why does this SQL counter lose updates? #sqldebugging

YouTube