Database: cre_Doc_and_collections
Question: How many child documents does each parent document has? List the document id and the number.
SQL:
SELECT T2.Document_Object_ID ,  count(*) FROM Document_Objects AS T1 JOIN Document_Objects AS T2 ON T1.Parent_Document_Object_ID = T2.Document_Object_ID GROUP BY T2.Document_Object_ID;