Are you running this in the REPL? It looks like Query cannot be certain of the types of the values m and sa because they are non-constant globals, and I think Query relies on type inference to know what the final column types should be. The first example is okay because the 2 in ^2 is hardcoded and the compiler knows its type can’t change.
I understand there are plans to remove this reliance on type inference in the future. But for now, if you wrap all the code in a function or declare the variables as constant beforehand (e.g. const m = 2979.413793) then it should work.