SELECT * from x_areas where aid not in (SELECT DISTINCT x.aid FROM x_areas x, x_areas t where x.aid = t.pid)