Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: SQL QUERY QUESTION...
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
![]() |
![]() |