Můžete to udělat (Fiddle )
select m.*, string_agg(d.name,',') as "person's mother"
from person m left outer join person d on m.name = d.mother
group by m.name,m.mother
Můžete to udělat (Fiddle )
select m.*, string_agg(d.name,',') as "person's mother"
from person m left outer join person d on m.name = d.mother
group by m.name,m.mother