1SELECT tbl_a.id, tbl_a.name,
2 COALESCE( ( SELECT json_agg(tbl_b.*)
3 FROM tbl_b
4 WHERE tbl_b.a_id = tbl_a.id ), '{}'::json),
5 COALESCE( ( SELECT json_agg(tbl_c.*)
6 FROM tbl_c
7 WHERE tbl_c.a_id = tbl_a.id ), '{}'::json)
8 FROM tbl_a;
9