update task_aud t1
set t1.owner = ( select t2.owner
from task t2
where t2.pk_task_id = t1.pk_task_id
and t2.owner != t1.owner
and t1.rev = (select max(t3.rev) from task_aud t3 where t3.pk_task_id = t1.pk_task_id )
)
where exists (
select 1
from task t2
where t2.pk_task_id = t1.pk_task_id
and t2.owner != t1.owner
and t1.rev = (select max(t3.rev) from task_aud t3 where t3.pk_task_id = t1.pk_task_id )
)
;