Can someone please help me this, i have a blackout :)
DB postgres v 10.8
So i have two tables (Users and User_roles)
Select * from users where id = 1
id groups username
1 ["read","admin"] test
Select * from User_roles
id name
1 write
2 read
3 guest
4 admin
How can i make a join on the values in the array so my output will be:
username user_id user_roles_id role
test 1 1 write
test 1 4 admin
unnest(groups)groupscolumn?text[],jsonb, something else?