Re: Need magic for a moving statistic

Поиск
Список
Период
Сортировка
От Andreas
Тема Re: Need magic for a moving statistic
Дата
Msg-id 4AC5F647.8030204@gmx.net
обсуждение исходный текст
Ответ на Re: Need magic for a moving statistic  ("A. Kretschmer" <andreas.kretschmer@schollglas.com>)
Ответы Re: Need magic for a moving statistic  ("A. Kretschmer" <andreas.kretschmer@schollglas.com>)
Список pgsql-sql
A. Kretschmer schrieb:
> [...] Or simpler:
>
> test=*# select  ((d-'2009-10-02'::date)/14) || '. period' as period, sum(value) from foo group by 1;
>   
This is tricky, because you use a text-column to sort but need numerical 
sorting since there will be more than 0-9 periods.

This is still the way to handle the periodity without pulling out some 
external skript language.
Thanks for the reply.   :)




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

Предыдущее
От: "A. Kretschmer"
Дата:
Сообщение: Re: right join problem
Следующее
От: "A. Kretschmer"
Дата:
Сообщение: Re: Need magic for a moving statistic