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

Home -> Community -> Usenet -> c.d.o.server -> Re: Need help for writing a query

Re: Need help for writing a query

From: Reinier <Reinier_Dickhout_at_hetnet.nl>
Date: Wed, 15 Nov 2000 16:06:46 +0100
Message-ID: <#f$WqXxTAHA.90@net003s>

select a.player
from player_games a
where not exists
(select b.game
 from player_games b
 where not exists
 (select c.player
  from player_games c
  where c.game = b.game
  and c.player = a.player
 )
)

or something like this..

This should list the players that play all the games.

Reinier.

Khemraj DOOKHEE <kdookhee_at_capgemini.fr> wrote in message news:8uoql9$jcb$1_at_s1.read.news.oleane.net...
> Sorry,
>
> I forgot to mention that the query should be able to give the name of
> players who play all of the games found in a list,
> where the list would be something like : ('GAME1', 'GAME2', 'GAME3', ...,
> 'xxx').
>
> Thanks,
> Khemraj.
>
> "Khemraj DOOKHEE" <kdookhee_at_capgemini.fr> a écrit dans le message news:
> 8uolds$gfh$1_at_s1.read.news.oleane.net...
> > Hi everyboby,
> >
> > I've got a table named 'PLAYER_GAMES' with the following data structure
 

> > (PLAYER varchar2(10), GAME varchar2(25)).
> > The table is filled as follows :
> >
> > PLAYER GAME
> > --------------------------------------------
> > TOM FOOTBALL
> > PETER BASKET-BALL
> > PETER TENNIS
> > PAUL VOLLEY-BALL
> > PAUL TENNIS
> > TOM BASKET-BALL
> > TOM RUGBY
> > STEVE FOOTBALL
> > STEVE RUGBY
> >
> >
> > Can anyone help me in writing the query which gives the name of players
 who
> > play BOTH football and rugby ?
> >
> > Thanks in advance,
> > Khemraj.
> >
> >
>
>
Received on Wed Nov 15 2000 - 09:06:46 CST

Original text of this message

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