I am using PostgreSQL 9.5
I have two table:
A
ID | isStatusA | IsStatusB | IsStatusC
0 | true | false | true
A table has only 1 row for data I need. Also i have B table with:
ID | status | a_id
0 | A | 0
0 | C | 0
When I wrote my select with "from A inner join B on a.id = b.a_id" that I got 2 rows. I have to get only one row (or json object) with checking that is that true/false in table A and is status present in table B. To return true i have to check both conditions.
Expected output: {A: true, B: false, C:true}