SELECT count( id) 
FROM table
GROUP  BY uid where posttime=(curdate()+1-1)

解决方案 »

  1.   

    SELECT count( id) as counter
    FROM table
    GROUP  BY uid where posttime=(curdate()+1-1) order by counter desc
      

  2.   

    SELECT count( id) as counter
    FROM table
    GROUP  BY uid where posttime=(curdate()+1-1) order by counter desc limit 0,1(curdate()+1-1)这个值要具体到你posttime的格式了
      

  3.   

    SELECT uid,count(id) as counter,posttime
    FROM table_name
    WHERE posttime=curdate() GROUP BY uid ORDER by counter desc limit 1;
      

  4.   

    select count(*),uid from 表 where posttime between concat(cast(now() as char(10)),' 00:00:00') and concat(cast(now() as char(10)),' 23:59:59') group by uid order by 1 limit 1