Why does the query throw NULL and Schrödinger’s cat?

An interesting problem came up in #SQLHelp today. The query is fairly simply and aims to generate a random distribution of value 1,2 and 3. I am not sure of the use case for it but this is what the code tries to achieve. SELECT choose(abs(checksum(newid())) % 3 + 1, 1.0, 0.6, 0.3) When the…