Unsolveable query?

From: Geert Bevin <gbevin(at)uwyn(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Unsolveable query?
Date: 2003-01-16 15:22:55
Message-ID: 1042730576.1834.28.camel@willow.uwyn.office
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)uwyn(dot)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

Responses

Browse pgsql-general by date

  From Date Subject
Next Message codeWarrior 2003-01-16 15:53:46 Re: three timestamps/table, use of 'now' in table creation statement
Previous Message Federico Pedemonte 2003-01-16 15:17:04 Force index usage on bigint in PL/PGSQL