How can I achieve the following using SQL server? I am trying to get page counts in Sitefinity.
The table structure has lot of columns but below are the ones that matter
**Id** **parentid** **title**
ABC DEF title1
XYZ DEF title2
LLL DEF title3
PPP ABC title4
III ABC title5
WWW PPP title6
A page can have subpages, and a subpage can have further subpages. In database, a subpage is represented with ID column and the parent page with parentID. How can i get count of children for each parent?