delete from Resource where Title in (select Title from Resource group by Title having count(Title) > 1) and Id not in (select min(Id) from Resource group by Title having count(Title)>1)