| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.server -> Re: Need help for writing a query
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
![]() |
![]() |