Re: query optimization question

From: Christoph Haller <ch(at)rodos(dot)fzk(dot)de>
To: terry(at)greatgulfhomes(dot)com
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: query optimization question
Date: 2002-11-06 15:58:31
Message-ID: 3DC93C27.5927F7D6@rodos.fzk.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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

Browse pgsql-sql by date

  From Date Subject
Next Message Stephan Szabo 2002-11-06 16:22:19 Re: FW: query optimization question
Previous Message Richard Huxton 2002-11-06 15:11:22 Re: FW: query optimization question