当月,每天的访问量 sql
当月,每天的访问量 sql:
1 SELECT COUNT(1) amount, 2 DATE_FORMAT(t.TIME,'%Y-%m-%d') actionDate 3 FROM t_action_log t 4 WHERE 5 date_format(t.TIME,'%Y-%m')= date_format(now(),'%Y-%m') 6 GROUP BY CONVERT(DATE_FORMAT(t.TIME,'%Y%m%d'),INTEGER) 7 ORDER BY t.TIME desc