Subject Re: [firebird-support] Aggregate UDF?
Author jfinch
Hi Cartoper: Try:

SELECT SQRT((SUM(N*N)-((SUM(N)*SUM(N))/COUNT(N)))/COUNT(N)) AS STANDEV
FROM TABLENAME

Regards,

Jonathan Finch
Rushmore Information Services, LLC

On June 24, 2010 at 1:14 AM Cartoper <cartoper@...> wrote:





Well, let us assume a table T had an int field N, the table has 4 rows:
{10,12,14,16}

I need to do this:

SELECT std_udf(N) FROM T;

And it will return one value:

2.236

Thus I need to 'create a custom aggregate function' or simple a "Aggregate
UDF"



[Non-text portions of this message have been removed]