Subject Re: [firebird-support] Re: Standard Deviation
Author Richard Wesley
On 30 Dec 2008, at 01:45, arnofab2000 wrote:

> Hi Richard, Very interesting code.
> Please, can You explain a bit more?
> VARP means?

Population variance. VAR is statistical variance. Similarly for STDEV

> What is %1?

Sorry, that is just the function argument.

> Can you provide an example code?

It IS example code. Or at least a string macro from our query
compiler for Firebird. Just use the expressions in place of the
functions (and substitute the function argument in for %1)

I should warn you that these are not numerically stable, but we have
not had any issues with them. If you are worried about this, I'd
recommend using Postgres or MySQL. If you have huge amounts of data,
extreme performance requirements and a 64 bit OS, you might look at
MonetDB (which also has implementations of these aggregates and is
wicked fast, although not always very stable...)

Best regards,
Richard Wesley Senior Software Developer Tableau