select s.id, t.*
from filelist as s
join (
select SensorId, FileName, count(*) as [count]
from filelist
group by SensorId, FileName
having count(*) > 1
) t on s.SensorId = t.SensorId and s.FileName = t.FileName
时间: 2024-11-05 16:03:18