generating date sequences

From: Patrick Scharrenberg <pittipatti(at)web(dot)de>
To: postgres list <pgsql-sql(at)postgresql(dot)org>
Subject: generating date sequences
Date: 2008-10-20 13:24:38
Message-ID: 48FC8696.2080201@web.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Hi!
Is there a simple way to generate sequences of dates like the following?
"2008-07-03 00:00:00"
"2008-07-04 00:00:00"
"2008-07-05 00:00:00"
"2008-07-06 00:00:00"

I'd like to join a table to aggregate the number of items for each day
(each item has a timestamp).
For some days however there are no items, resulting in no row instead of
a row with zero items.
I'd like to fill these empty rows.

I hope I could make my problem clear?!

Best regards
Patrick

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message A. Kretschmer 2008-10-20 13:40:47 Re: generating date sequences
Previous Message aldy 2008-10-20 08:23:59 my rules wont execute