View Single Post
Mentor
28Jul2009,03:00  
xpi0t0s's Avatar
I don't know if a query can be constructed that will return the results you want.

It's a fairly easy problem to solve using some kind of procedural solution; for each node, work out the number of children, recursively (or iteratively) until you have a final solution: 102 (say) has 2 plus the number of children 104 and 105 have; 104 has 2+(107 and 108's children), and so on until all outstanding "N's children" have been resolved.