SELECT addr_id,
coalesce(c.name , ' ')  || ' ' ||  (select name from data_address.street where str_id=a.parent limit 1) || 
coalesce(', ' ||addr_num,'')
FROM data_address.address a 
left join data_address.street b on a.parent=b.str_id
left join admin.cls c on c.parent='str_type' and c.code=b.type::text
order by
b.name