आपको जो चाहिए वह है सिंपल कॉड का रिलेशनल डिवीज़न।
select distinct p.team from player p
where not exists
(select * from player p1
where not exists
(select * from player p2
where
p.team=p2.team
and
p2.gid=p1.gid))
आपको जो चाहिए वह है सिंपल कॉड का रिलेशनल डिवीज़न।
select distinct p.team from player p
where not exists
(select * from player p1
where not exists
(select * from player p2
where
p.team=p2.team
and
p2.gid=p1.gid))