By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
| version |
|---|
| PostgreSQL 15.0 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 8.5.0 20210514 (Red Hat 8.5.0-10), 64-bit |
SELECT 1
CREATE TABLE
CREATE TABLE
INSERT 0 11
INSERT 0 5
CREATE TABLE
INSERT 0 3
| id | ids |
|---|---|
| 1 | {1,3,4,5} |
| 2 | {2} |
| 3 | {1,3,4,5} |
| 4 | {1,3,4,5} |
| 5 | {1,3,4,5} |
SELECT 5
| ids | usernames | refs1 | refs2 | asset_ids | asset_count |
|---|---|---|---|---|---|
| {1,3,4,5} | {bobo,lolo,momo,popo} | {a,c} | {d,f} | {1,3,4,5,6,8,9,10} | 8 |
| {2} | {toto} | {b} | {e} | {2,7} | 2 |
| null | {NULL} | {NULL} | {z} | {11} | 1 |
SELECT 3