表lin(a, b, c)
select *, px = identity(int, 1, 1) into #tbfrom lingo
select * from #tb as t1where not exists( select 1 from #tb as t2 where t1.a = t2.a and t2.px < t1.px)
godrop table #tb