One of the scariest things that can happen when you develop SQL code is getting indeterminate results. When you run your query multiple times and each time gets a different value.
Using SQL Windows functions with non-unique order columns can sometimes cause indeterminate results.
See the full story on my blog: https://chenhirsh.com/sql-windows-functions-might-be-non-deterministic/
Comments