From: Stephane Faroult [EMAIL PROTECTED]
Date: 2003/09/29 Mon AM 09:59:39 EDT
To: Multiple recipients of list ORACLE-L [EMAIL PROTECTED]
Subject: RE: interesting sql question
- --- Original Message --- -
From: [EMAIL PROTECTED]
To: Multiple recipients of list
Title: RE: RE: interesting sql question
Here is an attempt ...
select p.*
from persons p
where sid in
(select sid, count(bid)
from bids
group by sid
having count(sid) = (select count(boad_id) from boats))
/
You wanted to find all persons who have booked all boats ... add criteria
a user may request the same boat more than once. not sure that work.
From: Jamadagni, Rajendra [EMAIL PROTECTED]
Date: 2003/09/29 Mon AM 10:34:53 EDT
To: Multiple recipients of list ORACLE-L [EMAIL PROTECTED]
Subject: RE: RE: interesting sql question
Here is an attempt ...
select p
Title: RE: RE: interesting sql question
Hey ... the question wasn't complete ...
give us the full statement of the question ...
g
Raj
Rajendra dot Jamadagni at nospamespn dot com
All Views expressed
you could do this, but i would have concerns over the indexing strategy.
select name
from person,
(select distinct sid, count(*) bid_count
from bids
group by sid
HAVING count(*) = (SELECT COUNT(BOAT_ID FROM BOATS)) bids
where person.sid = bids.sid;
Now yours bids table is an intersect
, Thomas F [EMAIL PROTECTED]
Date: 2003/09/29 Mon PM 12:29:40 EDT
To: Multiple recipients of list ORACLE-L [EMAIL PROTECTED]
Subject: RE: RE: interesting sql question
yeah! I think it *is* homework :)
Tom
-Original Message-
Sent: Monday, September 29, 2003 12:10 PM