DELETE FROM cities
WHERE id NOT IN (SELECT *
FROM (SELECT MIN(n.id)
FROM cities n
GROUP BY n.regionid, n.okato) x)
Блог разработчика программ, web сервисов, парсеров, сайтов и еще всякой нужной разности
DELETE FROM cities
WHERE id NOT IN (SELECT *
FROM (SELECT MIN(n.id)
FROM cities n
GROUP BY n.regionid, n.okato) x)