Hi,

I'm having some issues trying to figure out the way to find the percentage of parents with children inside my database. There is a table where all the parents are stored called XY and there is a table where all the children are listed called table Children. How would I write a statement that finds the percentage of parents with children.

Member Avatar

Can you give it your own try, also some more details on both tables are necessary.

Try it with group by clause & aggregate count(). There seems to be a many-to-many between parents and children tables.

please can you explain your doubt with problem as it is a bit confusing for me to know your exact problem.

How are the two tables related, is there a parent ID in the child trable or a child ID in the parent table?