Search Postgresql Archives

Re: No stddev() for interval?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




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.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux