I have a output from select as below
| s.no | user_id | user_type | user_group | prefix | fname | mname | lname | suffix |nick_name | company | department | designation_title | industry | dob | nationality | passport_number | photograph | mobile | email | permanent_address | temporary_address | bbm_p |t_number_arrival | departure_date_time | depart_airlines | flight_number_departure |
| 17 | 0 | Husband | 23 | sasas | asd | | | | | | | | |0000-00-00 | | | | 0 | asdas | | sadx | asd| 0000-00-00 00:00:00 | | |
| 18 | 0 | wife | 23 | | | | | | | | | | | 0000-00-00 | | | | 0 | | | | | 0000-00-00 00:00:00 | | |
| 19 | 0 | kid1 | 23 | | | | | | | | | | | 0000-00-00 | | | | 0 | | | | | 0000-00-00 00:00:00 | | |
| 20 | 0 | kid2 | 23 | | | | | | | | | | | 0000-00-00 | | | | 0 | | | | | 0000-00-00 00:00:00 | | |
| 21 | 0 | kid3 | 23 | | | | | | | | | | | 0000-00-00 | | | | 0 | | | | | 0000-00-00 00:00:00 | | |
| 22 | 0 | kid4 | 23 | | | | | | | | | | | 0000-00-00 | | | | 0 | | | | | 0000-00-00 00:00:00 | | |
| 23 | 0 | Husband | 24 | sasas | asd | | | | | | | | | 0000-00-00 | | | | 0 | asdas | | sadx | asd| 0000-00-00 00:00:00 | | |
| 24 | 0 | wife | 24 | | | | | | | | | | | 0000-00-00 | | | | 0 | | | | | 0000-00-00 00:00:00 | | |
| 25 | 0 | kid1 | 24 | | | | | | | | | | | 0000-00-00 | | | | 0 | | | |
Which I need to be converted as below
| husband | wife | kid1 | kid2 | kid3 | kid4
sasas | | | | |
asd | | | | |
How can I modify my select query to group the records under husband , wife , kid1 , kid2 , kid 3 and kid 4 ?