第一次查询:查询身份证编号和出现次数select cardid,count(cardid) as total from p_person_info group by cardid在第一次查询结果进行二次查询:查询身份证出现次数大于1以上select cardid from (select cardid,count(cardid) as total from p_person_info group by cardid) temp where temp.total>1