select MAX(col1) as col1,col2,MAX(col3) as col3
from a
group by col2
------解决方案-------------------- SQL2005以上
select col1,col2,col3 from
(select *,rn=row_number() over (partition by col2 order by col1) from A) a
where rn='1' ------解决方案--------------------