Joseph Eldho

Joseph Eldho

  • NA
  • 187
  • 9.8k

inheritence property, adding members in tree structure

Feb 6 2018 1:29 AM
to find the count of emps added by an emp(emp and emps column name) 
employee 1 add 2 members(2,3) and employee 2 add 6 members ,here 2 adds (4,5) and 3 adds(6,7,8,9)  and so on 
how to write the query 
 
emp                   emps 
 1                        2
                           3
--------------------------------
 2                        4
                           5
                           6
                           7
                           8
                           9 
---------------------------------
 3                       10
                          11
---------------------------------
 4                      12
                         13 
 
etc,etc.............................. 
 

Answers (2)