Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: SQL QUERY QUESTION...

Re: SQL QUERY QUESTION...

From: Brian Peasland <peasland_at_edcmail.cr.usgs.gov>
Date: Thu, 2 Dec 1999 13:52:25 GMT
Message-ID: <38467999.17156AE0@edcmail.cr.usgs.gov>


If you do SELECT COUNT(*) FROM sports; that will return the total number of all sports. So just find the resorts that offer the same # of sports! SELECT resort_name,count(*) FROM resorts GROUP BY resort_name HAVING count(*) = (SELECT COUNT(*) FROM sports);

HTH,
Brian

jk_man_at_my-deja.com wrote:
>
> I have a table of different sports activities
> (call it sports) and another table listing
> different holiday resorts and the sports
> facilities that they offer (call it resorts).
>
> (You can tell that this is is a college question
> !).
>
> Now the query I have to design is...
>
> Select only the resorts that offer _all_ the
> different sports facilites.
>
> I've spent an age trying to solve this - and I
> just cannot figue it out.
>
> If anyone out there has any good ideas,
> please let me know.
>
> Thanx,
> Jack.
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
Received on Thu Dec 02 1999 - 07:52:25 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US