本帖最后由 SDM5945 于 2014-06-24 13:22:48 编辑

解决方案 »

  1.   

    select namea, nameb, max(time) as time from table group by namea, nameb
      

  2.   

    谢谢,我再追问一下,为什么我在select count(*) from xx group by xx,xx 时选出的不是总的条数啊
      

  3.   

    你知道什么叫group by吗
    所有的集约函数(count/sum/max/min/avg...)都是针对组内进行统计的,你按照xxx, xx分组,分了N组,count自然也是N个了