有一个表两个字段:ID 与 Count ID 可重复:
Count 可重复:求:ID不重复..Count 最大值原: 1    10
    2    20
    1    100
    2    200
    1    5
    2    14求: 1    100
    2    200  -----求最大值

解决方案 »

  1.   

    select id,(select max(count) as count1 from table table1 where table1.id=id) from table group by id
    不知道行不行
      

  2.   

    select id, max(count) as count from tbl group by id
      

  3.   

    select id, max(count) as count from tbl group by id
    ---------------------------------------------------
    可以吧..
      

  4.   

    select id,max(Count)as Totle from 表名 group by id
      

  5.   

    select distinct id, Count from users where  Count = (select max(Count)  from users)
      

  6.   

    看错题意了...-_-
    select max(count), id from users group by id