mysql查询指定字段值下重复数据方法

Select*fromCreditwhereProject_id = 160990Andperson_idin (selectorson_idfrom(selectPerson_id, count (1) fromcreditwhereproject_id = 160990groupbypbypbypbyppy erson_idhavingcount (1) > 1) k)

mysql如何去除两个字段数据相同的记录

MySQL查询双模式,是删除重复记录的数据库模式下的大表。
需要找到有重复记录的姓名进行比较。
很容易找到数据库中不重复的字段,很简单:Selectmin(`it`), 'name`from`Table`Groupby`Name`; 但这并不具有重复字段的价值。
(只获取最小的ID值)很容易查询哪些字段重复:Select`Name`,Count(`name`) ascountfrom`table`GroupBy`Name`havingCount(`name`)> 1ORDERBYCOUNTDESC; 一-查询 当该字段的值在双副本中时,必须使用子查询,所以下面说的是使用。
select`id`,`name`from`beach`where`name`中(select`name`from`table`group by`name`havingcount('name`name)> 1); 感觉MySQL没有为查询生成任何表。
所以我之前在无时间表中使用:createTable`tptable`as (select`name`from`havingcountCount(`name')> 1); 然后使用多表查询, select.- ', A .`Name`FROM`ATable`a, `t.`Ne`TwWWWa.Name` T.`Ne`,结果很快就出来了。
===================== 查询和删除重复记录的方法(1)查找表中多余的频繁记录,重复记录是基于Single Field(Bridges )作为判断 Select * frompeophapeoplidin(selectpeicalidfrompeoicalgroupbypypeidhavigsCount(PeopleID)),在表中,重复出现在其中最小的一项中(peoplid is in one(peoplid is in one(以一种方式 Rowid (Peoples Record deleteretefrompeplowherewleidin(selectpeicalidfrompeicGroupopbypeodhavingcount(PeopleID)>I),androwidnotin(Selectmin(Rowid),seqfromvitagrobypeont,seqhavingcount(*)>I),4.表,只保留Rowid的最小记录Deletefromvitaeawhere(A.PE Opleid,A.Seq)selectpeical,seqfromvitaegroginlid , seqhavyvypeid, seqhav (seligmin (Rowid)、Afrowidnotin (Selectmin (Rowid))、Afrowidnotin (seligmin (Rowid))、Afrowidnotin (seligmin (Rowid))、androwidnotin (seligmin (Rowid))、Afrowidnotin (seligmin (Rowid) I),*)> I) V.查找表中出现频率最高的记录(很多字段),没有其中最小的记录 Rowid * fromvitaaeawhereRereere(a.peoplidcount()> I) 和 Rowidnotin (seligmin (Rowid) from vitagropulid, seqhavingcount *)> I)