Use EXISTS. will perform faster than "not in".
1: 2:
select * from yourtable a where not exists(select 1 from yourtable where a.id = childparentrelate)