update test_copy TUPD
set last_date =
(select max(date_ajout)
from test_copy TSEL
where TSEL.ref_incident=TUPD.ref_incident
)