Received: from localhost.localdomain (postgresql.org [64.49.215.8]) by localhost (Postfix) with ESMTP id B9232475E71 for ; Mon, 24 Jun 2002 08:24:06 -0400 (EDT) Mailbox-Line: From joseph@asti.dost.gov.ph Mon Jun 24 08:24:06 2002 Received: from kitana.asti.dost.gov.ph (kitana.asti.dost.gov.ph [202.90.128.8]) by postgresql.org (Postfix) with ESMTP id 339B8475D6A for ; Mon, 24 Jun 2002 05:26:24 -0400 (EDT) Received: from Askr (askr.asti.dost.gov.ph [10.10.5.36]) by kitana.asti.dost.gov.ph (Postfix) with ESMTP id C785725813 for ; Mon, 24 Jun 2002 17:25:39 +0800 (PHT) Subject: variance aggregate function incorrect? Reference Materials reg create aggregate From: Joseph Syjuco To: postgres Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Mailer: Evolution/1.0.2-5mdk Date: 24 Jun 2002 18:13:25 -0400 Message-Id: <1024956806.2590.22.camel@Askr> Mime-Version: 1.0 X-Spam-Status: No, hits=4.0 required=5.0 tests=SUBJ_HAS_Q_MARK,DATE_IN_FUTURE_12_24 version=2.30 X-Spam-Level: **** X-Archive-Number: 200206/316 X-Sequence-Number: 8281 hi i needed the variance function ... i dont know if i introduced the wrong parameters or maybe this variance is not the variance that im looking for but it doesnt provide the right results variance=(nEx^2 - (Ex)^2)/(n(n-1)) my sql statement select variance(answer) from tbl_answer (where answer is of type integer) because of this i need to create my own variance aggregate (unless someone enlightens me on whats happening with the variance aggregate) so i would like to know if theres anyone who knows a good create aggregate tutorial (with samples) ... all i got from google so far is the reference from ninthwonder.com TIA