I have following id in column
[1,2]
which the account of ID 1 is Kenvin, and ID2 is Charles How can i get the info like this in a new column:
['Kenvin','charles']
table A
| id | account |
|---|---|
| 1 | kenvin |
| 2. | charles |
table B
| id | title | target | table_a_ids |
|---|---|---|---|
| 1 | abc | 4 | [1,2] |
| 2 | xyz | 1 | [] |
| 3 | ggg | 4 | [2] |
target output: (add a display columns as table_a_accounts in table B)
| id | title | target | table_a_ids | table_a_accounts |
|---|---|---|---|---|
| 1 | abc | 4. | [1,2] | ['kenvin','charles'] |
| 2 | xyz | 1 | [] | [] |
| 3 | ggg | 4 | [2] | ['charles'] |
WHERE table2.id MEMBER OF table1.array