I have two tables - one for staff and another for their children.
How can I group people on number of children?
staff table
pID|name|family|ETC|
---- |-------- |-------|-------|
123 |abc|ddd | 134 | f |
124 |dfv |eee | 900 | d |
126 |rgt |wwww|750|m|
children table
pID|name|family|ETC|
---- |-------- |-------|-------|
123 |mah|ddd |2005/06/09|son |
123 |dar|ddd |2013/11/01|girl|
123 |sia|ddd |2003/01/01|girl|
126 |naz|wwww|2007/25/01|girl|
Expected table
pID|no|
----- |- |
123 |3|
124 |0|
126 |1|