Posted by Eswar Koneti on August 14th, 2012
In a Big environment to know/work based on regional wide kind of doing some maintenance tasks in SCCM ,this would would help you to get you the count of Child sites reporting to primary.
select ReportingSiteCode ,COUNT(*) as [Child sites] from v_Site
group by ReportingSiteCode
order by ReportingSiteCode