This one should do it... maybe someone else can optimize it:
select * from simplequestion where p not in (
select p from simplequestion where c in(
select c from simplequestion having count(c) > 1 group by c));
Based on
create table simplequestion
(
p number,
c number
);
insert into simplequestion values (23442242,3455);
insert into simplequestion values (53453453,3454);
insert into simplequestion values (23442242,3455);
insert into simplequestion values (23442242,4567);
insert into simplequestion values (23442242,4667);
insert into simplequestion values (53453453,5656);
insert into simplequestion values (53535354,3543);
insert into simplequestion values (34543545,4354);
by Phil
UPDATE:
After inserting another row into your table:
insert into simplequestion values (53535354,3455);
Try the following
select * from simplequestion where p not in (
select p from simplequestion where c in(
select c from simplequestion having count(c) > 1 group by c
)
having count(p) > 1 group by p);