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: A tricky query question...

Re: A tricky query question...

From: Alan Shein <alanshein_at_erols.com>
Date: Thu, 2 Dec 1999 10:06:29 -0500
Message-ID: <8261t5$eoa$1@autumn.news.rcn.net>


Let's make sure his professor gives you an A.

Jonathan Lewis <jonathan_at_jlcomp.demon.co.uk> wrote in message news:944120186.989.0.nnrp-08.9e984b29_at_news.demon.co.uk...
>
> select resort
> from resort_sports
> group by resort
> having count(*) =
> (select count(*) from sports)
> ;
>
>
> Assumes the the PK on report_sports is (resort, sport)
> and the PK on sports is (sport)
>
>
> --
>
> Jonathan Lewis
> Yet another Oracle-related web site: http://www.jlcomp.demon.co.uk
>
> jk_man_at_my-deja.com wrote in message <823sgg$q9s$1_at_nnrp1.deja.com>...
> >I'm doing this college assignment and I just can't solve this query - it
> >seems straigth forward at first, but it isn't.
> >
> >OK...
> >
> >I'm given a table of sports activites (call this sports) and another
> >table of holiday resorts (call this resorts) where each resort has
> >numerous sports facilities. i.e. each resort has several rows, each one
> >describing a different sports facility.
> >
> >Now the query is:
> >
> >Select all those resorts that have facilities for *all* sports
> >activities (as listed in sports) and ignore the other resorts. I think
> >I'm supposed to use 'MINUS', but there may be other ways also.
>
>
>
Received on Thu Dec 02 1999 - 09:06:29 CST

Original text of this message

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