I have 3 tables A, B, C.
Let's say the data is as follow:
Table A Table B Table C | id | name | | id | a_id (FK) | value | | id | a_id (FK) | value | | :---: | :---: | | :---: | :-------: | :---: | | :---: | :-------: | :---: | | a0 | A0 | | b0 | a0 | B0 | | c0 | a0 | C0 | | a1 | A1 | | b1 | a0 | B1 | | c1 | a0 | C1 | | b2 | a1 | B2 |
I want to retrieve the records in A with their relations aggregated into an array or a json, like so:
2.1m questions
2.1m answers
60 comments
57.0k users