表 1 : User_Profile
-------------------------------------------------------------------------------------------
User_profile_id | Profile_form_id | Email | Zipcode | Firstname | Lastname
-------------------------------------------------------------------------------------------
1 | 4 |john@gmail.com | 123456 | john | peter
------------------------------------------------------------------------------------------
-
表 2 : Profile_attribute_form
-------------------------------------------------------------------
profile_attribute_id | Profile_attribute_name | profile_form_id
-------------------------------------------------------------------
1 | Address | 4
-------------------------------------------------------------------
2 | Phone Number | 4
------------------------------------------------------------------
3 | City | 4
-------------------------------------------------------------------
表 3 : User_Profile_attribute
User_profile_id | Profile_attribute_id | profile_attribute_value
--------------------------------------------------------------------------
1 | 1 | 23,Times road
--------------------------------------------------------------------------
1 | 2 | 9786530874
--------------------------------------------------------------------------
1 | 3 | New York
--------------------------------------------------------------------------
必要な最終結果:
-------------------------------------------------------------------------------------------
User_profile_id|Profile_form_id|Email |Zipcode|Firstname|Lastname|Address|PhoneNumber|City
-------------------------------------------------------------------------------------------
1 |4 |gm.com|123456 |john |peter |addr1 |9786530874 |NewY
-------------------------------------------------------------------------------------------
上記の結果の mysql クエリを作成する方法。