Standard deviation routine in SQL? Also, SQL FTP sites?

No, but it wouldn't be hard, e.g.,

t

#! /bin/ksh

#

# this script takes a input stream of numbers, and provides the mean

# and standard deviation for the first column. if this isn't exactly what

# you want, try using it with the `cut' program.

#

# the standard deviation it computes is the "population standard deviation",

# while the one provided by the HP-12C calculator shows the "sample standard

# deviation", i.e., the best estimate of the real standard deviation based on

# a sample from the total population. To see the difference, follow

# the instructions in the footnote on page 90 of the HP-12C manual, or

# ask someone who really understands statistics.

#

# written by Dannie Durand at ENSMP in France, slightly modified.

#

awk '

BEGIN { count = sum = carry = 0.0; printf ("mean \tstd. dev \n") }

length > 0 { ++count ; sum = sum + $1 ; carry = carry + $1*$1 }

END { mu = sum/count ;

sigma = sqrt(carry/count - mu*mu) ;

printf("%g\t%g\n", mu, sigma)

}

'