select c1,mix(c2) from table group by c1

解决方案 »

  1.   

    写错了。select * from table a where (c1,c2) in (select c1,min(c2) from table b group by c1)
      

  2.   

    如果能保证在c1相同时c2最小的只有一个的话试一试下面的方法
    select c1,min(c2),min(c3),min(IDX) from table group by c1 
      

  3.   

    你要什么样的结果呢,如果只是C2的话,呵呵
    SELECT min(C2) FROM table GROUP BY c1 
      

  4.   

    select * from table a,(select c1,min(c2) as c2 from table group by c1) as b where a.c1 = b.c1 and a.c2 = b.c2
      

  5.   

    楼上的方法很好。我班门弄斧,请高人指点:
    select * from TABLE where IDX in(select a from(select select c1,min(c2),min(IDX)as a from TABLE group by c1)as temp)