allora ...

select distinct id, data from tabella order by id, data o data, id