From: Christoph Haller <ch@rodos.fzk.de>
To: terry@greatgulfhomes.com
Cc: pgsql-sql@postgresql.org
Subject: Re: query optimization question
Date: Wed, 06 Nov 2002 16:58:31 +0100
Message-ID: <3DC93C27.5927F7D6@rodos.fzk.de> (raw)
Now that I've given your problem more thoughts (and searched for similar
stuff),
I think what you need is generating a cross table resp. pivot table.
Related to this, I am thinking of a query using Conditional Expressions
like
COUNT ( CASE WHEN ... THEN 1 ELSE NULL) in order to use GROUP BY.
Together with Richard's idea of using a function age_range(date) it
seems
realizable. I'm not yet ready to make a more detailed proposal, but you
might
want to think about it in the meantime, too.
Regards, Christoph
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: ch@rodos.fzk.de, terry@greatgulfhomes.com
Subject: Re: query optimization question
In-Reply-To: <3DC93C27.5927F7D6@rodos.fzk.de>
* 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