sharath.chalamgari (1/28/2011)
Koen (da-zero) (1/28/2011)
sharath.chalamgari (1/28/2011)
but if i cange the Query with some where condition,where i will get only one Row (sample) then the stdevp will results the null value
select stdev(pa_Rates) From Package where pa_PackageID = 1
The WHERE clause is executed first, so you are still calculating the variance over 1 row, hence the NULL.
Ya that's what i have explained above.
Then why is the explanation confusing? I find it pretty clear...
Need an answer? No, you need a question
My blog at https://sqlkover.com.
MCSE Business Intelligence - Microsoft Data Platform MVP