Re: No stddev() for interval?

Поиск
Список
Период
Сортировка
Искать
От
Brendan Jurd
Тема
Re: No stddev() for interval?
Дата
в 18:27:52
Msg-id
37ed240d0605201427s11a72763kf1222f6f2073082f@mail.gmail.com
Ответ на
Список
Дерево обсуждения
No stddev() for interval? "Brendan Jurd" <direvus@gmail.com>
Re: No stddev() for interval? Tom Lane <tgl@sss.pgh.pa.us>
Re: No stddev() for interval? "Ivan Zolotukhin" <ivan.zolotukhin@gmail.com>
Re: No stddev() for interval? Tom Lane <tgl@sss.pgh.pa.us>
Re: No stddev() for interval? "Nikolay Samokhvalov" <samokhvalov@gmail.com>
Re: No stddev() for interval? "Brendan Jurd" <direvus@gmail.com>
Re: No stddev() for interval? "Brendan Jurd" <direvus@gmail.com>
Re: No stddev() for interval? David Fetter <david@fetter.org>
Re: No stddev() for interval? "Brendan Jurd" <direvus@gmail.com>
Re: No stddev() for interval? "Nikolay Samokhvalov" <samokhvalov@gmail.com>
Re: No stddev() for interval? "Ivan Zolotukhin" <ivan.zolotukhin@gmail.com>
Re: No stddev() for interval? "Nikolay Samokhvalov" <samokhvalov@gmail.com>

That's because variance of foo is measured in foo^2 units.  What is
the square of an interval?

Cheers,
D

Well if you're willing to accept that for the purposes of computing the aggregates, an interval "month" is equal to 30 days (which is how avg(interval) already works), then an interval is reducable to a single quantity -- a number of seconds -- which can be squared.

30 days per month is pretty rough ... we could refine it to 30.4375, which is the average number of days per month over four years including one leap year.
В списке pgsql-general по дате отправления
От: David Fetter
Дата:
Сообщение: Re: No stddev() for interval?
От: Nikolay Samokhvalov
Дата:
Сообщение: Re: No stddev() for interval?
FAQ