日期:2014-05-18 浏览次数:20687 次
select b,c,min(a) a from tb group by b,c order by a desc
------解决方案--------------------
declare @t table (b int,c int,a int) insert into @t select 1,1,4 union all select 1,1,2 union all select 2,2,3 union all select 3,3,6 union all select 2,2,5 union all select 3,3,1 SELECT distinct b,c from @t /* b c ----------- ----------- 1 1 2 2 3 3 */