From: Pavel Stehule <pavel.stehule@gmail.com>
To: pgsql-sql@postgresql.org
Subject: Re: graphing time series data
Date: Wed, 14 Apr 2010 18:14:30 +0200
Message-ID: <y2l162867791004140914r15b6fdbzd8da3d2ff279e455@mail.gmail.com> (raw)
In-Reply-To: <20100414161152.GA17805@apartia.fr>
References: <20100414145434.GA13682@apartia.fr>
<r2k396486431004140846y4579154erc604d6286ac2cb89@mail.gmail.com>
<20100414154958.GA16847@apartia.fr>
<n2i162867791004140906l3cf1ac73q39343c54bb5facb1@mail.gmail.com>
<20100414161152.GA17805@apartia.fr>
2010/4/14 Louis-David Mitterrand <vindex+lists-pgsql-sql@apartia.org>:
> On Wed, Apr 14, 2010 at 06:06:59PM +0200, Pavel Stehule wrote:
>> I don't understand well. Why you don't use a function date_trunc(),
>>
>> select date_trunc('week', created), count(*)
>> from price
>> group by date_trunc('week', created)
>
> Because if a price doesn't change for more than a week, then some weeks
> will have bad statistical distribution (i.e not including prices which
> only have their 'modified' updated). So I (think I) need to (1) generate
> the weeks separately and (2) average prices that are current for each
> week.
>
> But I could be missing something obvious.
ok
Pavel
>
>
> --
> Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-sql
>
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: pavel.stehule@gmail.com
Subject: Re: graphing time series data
In-Reply-To: <y2l162867791004140914r15b6fdbzd8da3d2ff279e455@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox