select *
from object o1
left join object o2
on o1.object_id = o2.object_prt
where o2.object_id is null
http://mikehillyer.com/articles/managing-hierarchical-data-in-mysql/
select *
from object o1
left join object o2
on o1.object_id = o2.object_prt
where o2.object_id is null
http://mikehillyer.com/articles/managing-hierarchical-data-in-mysql/