SELECT COUNT(*) as repetitions, campaign,client
FROM cmdata
GROUP BY client,campaign
HAVING repetitions > 1
This SQL will delete any duplicates in campaignid, and keeps the higher id one
DELETE u1 FROM targets u1, targets u2 WHERE u1.id < u2.id AND u1.campaignid = u2.campaignid












