I am trying to create a new table that will consist of selected data from three existing tables.
The three existing tables are set up as following, and my desired result is at the bottom:
people
id last_name first_name email
1 Smith Fred Fred@..
2 Jones Tom Tom@..
3 Doe Jane Jane@..
taxonomy
id taxonomy
1 age
2 gender
3 height
details
id person_id detail_id content
1 1 1 36
2 1 2 M
3 1 3 5'10"
4 2 1 29
5 2 2 M
6 2 3 6'3"
7 3 1 27
8 3 2 F
9 3 3 5'8"
New Table
id last_name first_name email age
1 Smith Fred Fred@.. 36
2 Jones Tom Tom@.. 29
3 Doe Jane Jane@.. 27
Thanks in advance for your help!