>So, do you want to count all subcategories or just top level subcategories? In the former case we're talking about recursive CTE.
The initial purpose was to count, from a parent, the number of first level child. The SQL select command I provided in the other message sums it all. I basically added a COUNT(*) with a LEFT JOIN. It is just that this forces me to MIN() all the extra fields I want or to switch into a sub select as you mention.