declare @t table
(
City nvarchar(20),
Salary decimal(9, 2)
)
insert into @t
(City, Salary)
values (N'New York', 65000),
(N'London', 68000),
(N'Sydney', 59000),
(N'Sydney', 59000),
(N'Tokyo', 66000)
select *
from @t as t
group by t.City,
t.Salary
having count(1) > 1
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…