Skip site navigation (1) Skip section navigation (2)

Re: How to Make aggragate Function? Standard Deviation?

From: Jason Earl <jdearl(at)yahoo(dot)com>
To: paallen(at)attglobal(dot)net, PGSQL-NOVICE(at)POSTGRESQL(dot)ORG
Subject: Re: How to Make aggragate Function? Standard Deviation?
Date: 2001-08-15 17:59:25
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-novice
What version of PostgreSQL are you using?  Version 7.1
has stddev() built right in (I don't believe it was
available in the 7.0 series, and I can guarantee it
wasn't in the 6.5 series).  I use it all of the time.

SELECT stddev(weight) FROM caseweights1;


--- "Phillip J. Allen" <paallen(at)attglobal(dot)net> wrote:
> Hi all,
> I am just starting to write functions in plpgsql.  I
> have made some
> simple functions but now I need a standard deviation
> function.  The
> documentation was not too clear so does anyone have
> any suggestion on
> how to begin?  I can do this in plpgsql or do I need
> to do this in C?
> thanks,
> Phillip J. Allen
> Consulting Geochemist/Geologist
> Lima Peru
> e-mail: paallen(at)attglobal(dot)ent
> ---------------------------(end of
> broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?

Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger

In response to

pgsql-novice by date

Next:From: John BurskiDate: 2001-08-16 13:59:48
Subject: Opaque data type
Previous:From: James HallDate: 2001-08-15 17:29:59
Subject: Wildcard queries?

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group