Проапдейтит как надо? update au set email = '' from auth_user au right join (select distinct max(last_login) as Max_lof, email from auth_user group by email HAVING count(email) > 1 and email!='' ) ss on au.email = ss.email and au.last_login <>ss.Max_lof