Hãy thử tham gia bên trái:
select * from task t
left join unit ut on ut.id = t.unit_id
left join building bt on bt.id = t.building_id
Hãy thử tham gia bên trái:
select * from task t
left join unit ut on ut.id = t.unit_id
left join building bt on bt.id = t.building_id