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: Alan Shein <alanshein_at_erols.com>
Date: Thu, 2 Dec 1999 09:59:55 -0500
Message-ID: <8261gr$d1l$1@autumn.news.rcn.net>


Brian,

We try to not actually provide answers to students, but help them along with suggestions and hints.

Brian Peasland <peasland_at_edcmail.cr.usgs.gov> wrote in message news:38467999.17156AE0_at_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 - 08:59:55 CST

Original text of this message

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