codice:
select u.*,
max(case when i.tipo_indirizzo = 'casa' then tel else null end) as casa,
max(case when i.tipo_indirizzo = 'lavoro' then tel else null end) as lavoro
from utenti as u
inner join indirizzi as i
on u.id = i.id_utente
group by u.id