Используйте RANK () OVER PARITION, как это (2005, 2008):
declare @table as table (c1 nvarchar(10), c2 nvarchar(10), c3 int, id int identity(1,1))
insert into @table values
('Mike', 'London', 578),
('Mike', 'Bonn', 234),
('Jane', 'Madrid', 245),
('Billy', 'Paris', 345),
('Jane', 'Rome', 346)
select c1, c2, c3 from
( select id, c1, c2, c3, RANK() over ( partition by c1 order by id) as Rank from @table) tmp
where tmp.Rank = 1
order by id
Используйте интересное предложение WHERE, как это (2000):
select t2.*
from
@table t2
where
(select COUNT(*) from @table t where t.c1=t2.c1 and (t2.c2 > t.c2 or (t2.c2 = t.c2 and t2.c3 > t.c3))) = 1
union
select * from @table where c1 in (select c1 from @table group by c1 having COUNT(*) = 1)
Порядокотличается от вышеупомянутого, но вам придется разобраться с этим в ваших данных реального мира.