I am currently making a binary tree and I was able to create the tree. What I am facing now is " How to get the total number of children in my left side and total number in my right side ".

The structure is:

1
                                      2                                       3
                          4                  5                   6                     7
                      8       9        10     11         12    13          14    15

My database variables for each person is Position and Upline
Any help is appreciated. God Bless!

I am currently making a binary tree and I was able to create the tree. What I am facing now is " How to get the total number of children in my left side and total number in my right side ".

The structure is:

1
                                      2                                       3
                          4                  5                   6                     7
                      8       9        10     11         12    13          14    15

My database variables for each person is Position and Upline
Any help is appreciated. God Bless!

use COUNT members WHERE placement = left/right AS left/right total