多个字段分组进行批量删除
delete from a_b
where a in(
select a from a_b
where c=0
group by a,b,d
having count(a)>1
) and id(唯一键) not in(
select max(id) from a_b
where c=0
group by a,b,d
having count(a)>1
)where c=0
多个字段分组进行批量删除
delete from a_b
where a in(
select a from a_b
where c=0
group by a,b,d
having count(a)>1
) and id(唯一键) not in(
select max(id) from a_b
where c=0
group by a,b,d
having count(a)>1
)where c=0