variance aggregate function incorrect? Reference Materials reg create aggregate

Поиск
Список
Период
Сортировка
От Joseph Syjuco
Тема variance aggregate function incorrect? Reference Materials reg create aggregate
Дата
Msg-id 1024956806.2590.22.camel@Askr
обсуждение исходный текст
Ответы Re: variance aggregate function incorrect? Reference Materials reg create aggregate  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: variance aggregate function incorrect? Reference Materials  (Bruce Momjian <pgman@candle.pha.pa.us>)
Список pgsql-sql
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








В списке pgsql-sql по дате отправления:

Предыдущее
От: Mathieu Arnold
Дата:
Сообщение: Re: Select + min question
Следующее
От: Devrim GUNDUZ
Дата:
Сообщение: Re: Select + min question