By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
CREATE TABLE
INSERT 0 5
| id | value |
|---|---|
| 1 | {friend,apple,cat} |
| 2 | {cat,friend,dog} |
SELECT 2
| id | value |
|---|---|
| 1 | {friend,apple,cat} |
| 2 | {cat,friend,dog} |
| 4 | {wildcat,potato,alices-friend} |
SELECT 3
| id | value |
|---|---|
| 2 | {cat,friend,dog} |
| 5 | {friend1,friend2,no_tigers} |
| 4 | {wildcat,potato,alices-friend} |
| 1 | {friend,apple,cat} |
SELECT 4