I have a table with data and structure like:
+-----------+-----------+-----------+-----------+
| member_id | bank_name | bank_ac | ac_holder |
+-----------+-----------+-----------+-----------+
| 14 | | 012-000 | |
| 14 | | 012-001 | Andy |
| 14 | CR Bank | 012-002 | Jacky |
+-----------+-----------+-----------+-----------+
What i need is to select one entry with all columns filled by the first non-empty value. As:
+-----------+-----------+-----------+-----------+
| member_id | bank_name | bank_ac | ac_holder |
+-----------+-----------+-----------+-----------+
| 14 | CR Bank | 012-000 | Andy |
+-----------+-----------+-----------+-----------+
I have no idea how to start. Can someone give me suggestion?
ps: the empty fields are NOT NULL, they are empty string. schema provided here
Andygets retained overJacky?bank_nameandac_holdercolumns will have missing values?