select distinct for incoming cases (get most recently downloaded record
by id)