Re: query optimization question

Поиск
Список
Период
Сортировка
От Christoph Haller
Тема Re: query optimization question
Дата
Msg-id 3DC93C27.5927F7D6@rodos.fzk.de
обсуждение исходный текст
Ответ на query optimization question  (<terry@ashtonwoodshomes.com>)
Список 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
likeCOUNT ( 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



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

Предыдущее
От: Richard Huxton
Дата:
Сообщение: Re: FW: query optimization question
Следующее
От: Stephan Szabo
Дата:
Сообщение: Re: FW: query optimization question