在mysql中成对找到重复项

Dea*_*ose 3 mysql

我想知道如何在两列组合的表中找到重复值。

假设我的表有字段 id || name || father_name || region || dob

现在我如何找到结果集,例如:

在此处输入图片说明

.ie 我想找到三列相同的所有行。

jue*_*n d 5

select t1.*
from your_table t1
join
(
    select name, father_name, region
    from your_table
    group by name, father_name, region
    having count(*) >= 3
) t2 on t1.name = t2.name 
    and t1.father_name = t2.father_name
    and t1.region = t2.region 
Run Code Online (Sandbox Code Playgroud)