where $\textstyle{x_1,, x_2,, \ldots,, x_N}$ are the observed values of the sample items, $\bar{x}$ is the mean value of these observations, and $N$ is the number of observations in the sample.
Example:
table T = with
[| as A, as B |]
[| 0, "a" |]
[| 0, "a" |]
[| 0, "b" |]
[| 1, "b" |]
[| 2, "c" |]
table G[gdim] = by T.B
where T.B != "c"
show table "" a1b4 with
gdim
stdev(T.A)
group by gdim