📜  sql 根据两列选择重复项 - SQL 代码示例

📅  最后修改于: 2022-03-11 15:05:09.034000             🧑  作者: Mango

代码示例1
select s.id, t.* 
from [stuff] s
join (
    select name, city, count(*) as qty
    from [stuff]
    group by name, city
    having count(*) > 1
) t on s.name = t.name and s.city = t.city