The documentation pages of the STDEV / STDEVP functions in SQL Server says the following.
STDEV/STDEVP is a deterministic function when used without the OVER and ORDER BY clauses. It is nondeterministic when specified with the OVER and ORDER BY clauses.
Questions:
Why are the
STDEV
/STDEVP
nondeterministic when used withOVER
andORDER BY
?Can anyone provide a few good examples illustrating this point?