FIRST OF ALL BACKUP UR DB

well am not sure, I thought about
delete table_name where id not in (select distinct id from table_name)

but then i thought it wont distinct out "sitename" field
let me think someway out...if I couldnt do it via query we would design a php code to do it which would make it easy tbh