hopefully you can get what I want to do from the mysql query below.
delete d1 from D as d1, D as d2 left join C rel1 on rel1.tld_tod_id=d1.did left join C rel2 on rel2.tld_tod_id=d2.did where d1.did!=d2.did and d1.name=d2.name and rel1.cid is null and rel2.cid is not null ;
I got unknown column d1.did in on clause, how do I get it right?