I have 3 tables linked with a left join. see example below:
SELECT s.suiteid, s.testid, s.naam, ms.id, ms.projectid, ms.naam FROM suites as s
left join tests as t on s.testid = t.id
left join meta_suites as ms on t.projectid = ms.projectid
where s.testid = 44
result:
‘10000’, ‘44’, ‘000_10000_suite_algemeen’, ‘10000’, ‘1’, ‘Basis test SKM’
‘10000’, ‘44’, ‘000_10000_suite_algemeen’, ‘10050’, ‘1’, ‘Informatievoorziening’
‘10000’, ‘44’, ‘000_10000_suite_algemeen’, ‘10100’, ‘1’, ‘Test beheer’
below is the outcome that I really want:
‘10000’, ‘44’, ‘000_10000_suite_algemeen’, ‘10000’, ‘1’, ‘Basis test SKM’
’ ', ’ ', ’ ', ‘10050’, ‘1’, ‘Informatievoorziening’
’ ', ’ ', ’ ', ‘10100’, ‘1’, ‘Test beheer’
The connection is the “10000” in both tables. Because 10050 and 10100 has no connection they don’t have data in the first table
thanks for helping!