OK, given the following dataset:
ID , name , lineManagerKey, lineManagerName
1 , Joe , null , null
2 , Herbert , 1 , Joe
3 , John , 1 , Joe
4 , George , null , null
5 , Paul , null , null
6 , Ringo , null , null
7 , Frank , null , null
8 , Jeff , 7 , Frank
I want to return the following:
Manager,Minion
Joe,Herbert
Joe,John
Frank,Jeff
Every way I am thinking of the possible query it seems to want to return multiple rows? Any ideas?