select id_candidato, max(id) from seguimiento where id_peticion = 4 and tipo = 'dossieres' group by id_candidato order by max(id)