declare @tb table([a] date, varchar(3),[c] int)insert @tbselect '2005-9-9','DEC',1 union allselect '2005-9-10','DEC',2 union allselect '2005-9-9','SEC',1 union allselect '2005-9-10','SEC',2select a,max(b),min(b),c from @tbgroup by a,c--测试结果:/*2005-09-09 SEC DEC 12005-09-10 SEC DEC 2*/