By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
| version |
|---|
| PostgreSQL 14.10 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 8.5.0 20210514 (Red Hat 8.5.0-20), 64-bit |
SELECT 1
CREATE TABLE
INSERT 0 2
CREATE TABLE
INSERT 0 2
CREATE TABLE
INSERT 0 3
| json_agg |
|---|
| [{"id" : 1, "title" : "aaa", "actors" : [{"id" : 1, "name" : "Bob"}, {"id" : 2, "name" : "John"}]}, {"id" : 2, "title" : "bbb", "actors" : [{"id" : 1, "name" : "Bob"}]}] |
SELECT 1