大家帮我看看这个select该怎么写啊,急!!
现在有一个表table_a   有三个字段a,b,c值为 
 a         b         c 
 1         1         1 
 3         1         2 
 1         1         4 
 4         2         5 
 想要的检索结果是 
 a         b         c 
 1         1         1 
 3         1         2 
 4         2         5 
 也就是想要把(a         b)重复的数据只取一条,但同时也要取得对应的c. 
 不知道有没有什么好的办法??????
------解决方案--------------------select * from 
 ( 
   select *,row_number() over (partition by a,b order by c) rn from table_a 
 ) t 
 where t.rn=1
------解决方案--------------------select a, b, min(c) 
 from table_a 
 group by a, b   
 這個應該也可以.反正方法就是有N多種.多學習~~