Skip to content

Tag: join

I have 3 table and need exclusive left join

Table_1: Table_2: Table_3: Using 2 left joins I got this: But I do group over the first column and 8 is accumulated twice, I wish to get: I also wish to avoid UNION ALL because my first table is actually a complex query, I wish to avoid its recalculation. https://dbfiddle.uk/?rdbms=postgres_12&fiddle=d601…

Join the records with sql?

I have a table with those 5 rows. code | type_id | status —–+——–+——– 123 | 123456 | DONE 123 | 456789 | DONE 321 | 654321 | DONE 321 | 897321 | DONE 456 | 999888 | DONE 456 | …