Prova
codice:
select id_fattura, max(data) from scadenzario group by id_fattura