查询数据库表里重复的数据
SELECT 字段A, 字段B, 字段C, COUNT(*) FROM Table GROUP BY 字段A, 字段B, 字段C HAVING COUNT(*) > 1;
查找表中多余的重复记录(多个字段),不包含rowid最小的记录
select * from pls_ad_profile a
where (a.seller_account,a.profile_id) in (select seller_account,profile_id from pls_ad_profile group by seller_account,profile_id having count(*) > 1)
and id not in (select min(id) from pls_ad_profile group by seller_account,profile_id having count(*)>1);