Vinay K

Vinay K

  • 858
  • 831
  • 1.3k

Interview Question in SQL Queries

Aug 31 2017 1:00 PM
How to get the Output from below tables?
 
I have two tables T1 and T2
It has relation between two tables 
 
Table : T1
 id Name  Gender
 1  JhonMale
 2RootMale
 3  DianaFemale
 4Tony Male
 5David Male
 6RiyaFemale 
 
Table : T2 
 
 child_id parent_id
 12
 13
 4
 4
 
 Output :
 
ch_id child_Name Father NameMother Name 
 1 Jhon Root Diana
 4 Tony David  Riya
 
 

Answers (1)