查询表中相同记记录
select a from table where a in (select a from table group by a having count(a) >1 )
删除表中多余的重复记录
delte from table where a in (select a from table group by a having count(a) >1) and rowid not in(select min(rowid) from table group by a having count(a) >1)
查询表中多个字段相同的记录
select * from table where (a,b) in (select a,b from table group by (a,b) having count(*) >1 )
查询表中多个字段相同的多余的记录
delete from table where (a,b) in (select a,b from table group by (a,b) having count(*) >1) and rowid not in(select min(rowid) from table group by (a,b) having count(*) >1)