Tbl1
| id | eez |
|---|---|
| 1 | 8438 |
| 8493 |
Tbl2
| eez_id | name |
|---|---|
| 8438 | Greenlandic Exclusive Economic Zone |
| 8493 | Canadian Exclusive Economic Zone |
Desired output
| id | eez | name |
|---|---|---|
| 1 | 8438 | Greenlandic Exclusive Economic Zone |
| 8493 | Canadian Exclusive Economic Zone |
So far I've done the below, but it is giving me undesired results. Any thoughts here?
select a.*, b.name
from tbl1 as a
left join tbl2 as b
on b.eez_id in unnest(a.eez);
