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.   :)



--
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql

Reply via email to