I have employee database with team leader now I have to generate the query which help me to extract the list of employee under team leader. There are chances if I pass the ID for whom there are two teams so this person should get all the employees under them including both the team leaders.
E1 - T1
E2 - T1
E3 - T2
T1 - T3
so if I pass T1 we should get two employees and when we pass T3 we should get three employees