I have hierarchical data that I represent using the adjacency list model.
TABLE
ID
parentID
title
I am wondering, what is the simplest way to SELECT the number of immediate children for each node? If possible, I'd like to do this in a single select, yielding a resultset like so...
RESULTS...
ID title childCount
1 test1 10
2 test2 2
3 test3 0
etc...
Thanks for your advice!