я думаю
SELECT STDEV(IQ.cnt) as SDofCounts from --'from' was missing
(select ITEMS.OwnerID, COUNT(0) as cnt from dbo.ITEMS
GROUP BY ITEMS.OwnerID
) IQ
+++++++++++++++++
если вы запустили это, чтобы увидеть некоторые данные
select ITEMS.OwnerID, COUNT(0) as cnt, COUNT(0) * COUNT(0) as EXS from dbo.ITEMS
GROUP BY ITEMS.OwnerID
то вы могли бы сделать
SELECT STDEV(IQ.cnt) as SDofCounts,
SUM(EXS) as SigmaEXsquare,
SUM(1.0 * cnt) / COUNT(0) as MU,
SUM(EXS) - (SUM(1.0 * cnt) / COUNT(0)) * (SUM(1.0 * cnt) / COUNT(0)) as Variance,
SQRT(SUM(EXS) - (SUM(1.0 * cnt) / COUNT(0)) * (SUM(1.0 * cnt) / COUNT(0))) AS SDcalc
from
(select ITEMS.OwnerID, COUNT(0) as cnt, COUNT(0) * COUNT(0) as EXS from dbo.ITEMS
GROUP BY ITEMS.OwnerID
) IQ