在数据库中执行以下语句:
delete a
from `ecs_goods_attr` a
left join(select `goods_attr_id`,`attr_id` from `ecs_goods_attr` group by goods_id,attr_value) b
on a.`goods_attr_id` = b.`goods_attr_id`
and a.`attr_id` = b.`attr_id`
where b.`goods_attr_id` is null AND b.`attr_id` is null;