From: yusuf0478@netscape.net
To: pgsql-sql@postgresql.org
Subject: Query Help
Date: Thu, 23 Oct 2003 14:33:09 -0400
Message-ID: <7E2F242E.303998B7.037EC703@netscape.net> (raw)
I'm interested in finding the minimim A.id such that the following holds:
select A.charge
, B.user_id
, C.employee_id
from A
inner join B using (user_id)
inner join C using (employee_id)
except
select X.charge
, Y.user_id
, Z.employee_id
from X
inner join Y using (user_id)
inner join Z using (employee_id)
--
I can't do the following, since the number of selected columns have to match:
select A.id
, A.charge
, B.user_id
, C.employee_id
from A
inner join B using (user_id)
inner join C using (employee_id)
except
select X.charge
, Y.user_id
, Z.employee_id
from X
inner join Y using (user_id)
inner join Z using (employee_id)
Can someone help me with the query?
Thanks in advance.
__________________________________________________________________
McAfee VirusScan Online from the Netscape Network.
Comprehensive protection for your entire computer. Get your free trial today!
http://channels.netscape.com/ns/computing/mcafee/index.jsp?promo=393397
Get AOL Instant Messenger 5.1 free of charge. Download Now!
http://aim.aol.com/aimnew/Aim/register.adp?promo=380455
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: yusuf0478@netscape.net
Subject: Re: Query Help
In-Reply-To: <7E2F242E.303998B7.037EC703@netscape.net>
* 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