Please help me to write this query. I faced this question in an interview.
tblEmployee
Emp_id | Emp_Name | Emp_Gender |
1 | John | Male |
2 | Dean | Male |
3 | Mary | Female |
tblRelatives
Emp_id | Relatives_Id |
1 | 2 |
1 | 3 |
Write a query to get the output given below.
Emp_id | Emp_Name | Father | Morther |
1 | John | Dean | Mary |