SQL 语句
去重字段里的值
SELECT DISTINCT cat_id,goods_sn,repay FROM `ecs_goods` where cat_id != 20014
删除除去 去重字段
DELETE FROM `ecs_goods` where goods_id NOT IN (
select bid from (select min(goods_id) as bid from `ecs_goods` group by cat_id,goods_sn,repay) as b
);