Re: variance aggregates per SQL:2003

Поиск
Список
Период
Сортировка
От Neil Conway
Тема Re: variance aggregates per SQL:2003
Дата
Msg-id 1141779366.20504.17.camel@localhost.localdomain
обсуждение исходный текст
Ответ на Re: variance aggregates per SQL:2003  (David Fetter <david@fetter.org>)
Ответы Re: variance aggregates per SQL:2003  (David Fetter <david@fetter.org>)
Re: variance aggregates per SQL:2003  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-patches
On Tue, 2006-03-07 at 16:36 -0800, David Fetter wrote:
> The rationale is kinda mathematical.  A measure of deviation from
> central tendency (i.e. variance or stddev) is something where you
> probably don't want to normalize the weights.
>
> For example, the standard deviation of {0,1,1,1,2} is about 0.707, but
> the standard deviation of {0,1,2} is 1.

Well, I realize that stddev(DISTINCT x) != stddev(x) and that most
people are going to be interested in stddev(x), but I don't think it's
inconceivable for someone to be interested in stddev(DISTINCT x).
Explicitly checking for and rejecting it doesn't serve any useful
purpose that I can see, beyond compliance with the letter of the
standard -- if the user asks for stddev(DISTINCT x), are we really
providing useful behavior if we refuse to calculate it?

-Neil



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

Предыдущее
От: David Fetter
Дата:
Сообщение: Re: variance aggregates per SQL:2003
Следующее
От: David Fetter
Дата:
Сообщение: Re: variance aggregates per SQL:2003