Полагаю, вы просто хотите:
select a.name as hostname from a
union -- intentionally eliminate duplicates
select b.name from b
union
select c.hostname from c
union
select d.addr_host from d;
Если вы хотите, чтобы имя было только первым '.'
, тогда:
select substr(a.name, 1, instr(a.name || '.', '.') - 1) as hostname from a
union -- intentionally eliminate duplicates
select substr(b.name, 1, instr(b.name || '.', '.') - 1) from b
union
select substr(c.hostname, 1, instr(a.name || '.', '.') - 1) from c
union
select substr(d.addr_host, 1, instr(d.addr_host || '.', '.') - 1) from d;