Re: graphing time series data
| От | Louis-David Mitterrand |
|---|---|
| Тема | Re: graphing time series data |
| Дата | |
| Msg-id | 20100414161152.GA17805@apartia.fr обсуждение исходный текст |
| Ответ на | Re: graphing time series data (Pavel Stehule <pavel.stehule@gmail.com>) |
| Ответы |
Re: graphing time series data
|
| Список | pgsql-sql |
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.
В списке pgsql-sql по дате отправления: