Unsolveable query?

Поиск
Список
Период
Сортировка
От Geert Bevin
Тема Unsolveable query?
Дата
Msg-id 1042730576.1834.28.camel@willow.uwyn.office
обсуждение исходный текст
Ответы Re: Unsolveable query?  (greg@turnstep.com)
Список pgsql-general
Hello,

the details of my problem are described at
http://uwyn.com/greenenergy.txt

I basically have a set of tables with one product table and other tables
that contain labels and legends for each row in the product table. I'm
looking for a way to write one query that retrieves all the products and
the count of labels and legends, 0 should be returned if none are
present. The fact of doing several joins and aggregate functions
together returns undesired results.

Can anyone solve this query, or do I have to write a count query for
each linked table (one for labels and one for legends)?

Thanks a lot for the help,

Geert

--
Geert Bevin             Uwyn
"Use what you need"     Lambermontlaan 148
http://www.uwyn.com     1030 Brussels
gbevin@uwyn.com         Tel & Fax +32 2 245 41 06

PGP Fingerprint : 4E21 6399 CD9E A384 6619  719A C8F4 D40D 309F D6A9
Public PGP key  : available at servers pgp.mit.edu, wwwkeys.pgp.net

Вложения

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

Предыдущее
От: Federico Pedemonte
Дата:
Сообщение: Force index usage on bigint in PL/PGSQL
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Force index usage on bigint in PL/PGSQL