DELETE FROM [Translation] where keyid in
(SELECT T.KeyID FROM [Translation] as T WHERE T.PageID=6088 And T.KeyID<=61866 And
T.TranslationKey IN (SELECT T1.TranslationKey FROM [Translation] as T1 GROUP BY TranslationKey HAVING COUNT(T1.TranslationKey)>1)
(SELECT T.KeyID FROM [Translation] as T WHERE T.PageID=6088 And T.KeyID<=61866 And
T.TranslationKey IN (SELECT T1.TranslationKey FROM [Translation] as T1 GROUP BY TranslationKey HAVING COUNT(T1.TranslationKey)>1)
AND T.KeyID NOT IN (SELECT MAX(T2.KeyID) FROM [Translation] as T2 GROUP BY T2.TranslationKey HAVING COUNT(T2.TranslationKey)>1))
DELETE FROM [Translation] where keyid in
(SELECT T.KeyID FROM [Translation] as T WHERE T.PageID=6088 And T.KeyID<=61866 And
T.TranslationKey IN (SELECT T1.TranslationKey FROM [Translation] as T1 GROUP BY TranslationKey HAVING COUNT(T1.TranslationKey)>1)
AND T.KeyID NOT IN (SELECT MAX(T2.KeyID) FROM [Translation] as T2 GROUP BY T2.TranslationKey HAVING COUNT(T2.TranslationKey)>1))