mysql 之 按照指定日期格式分组统计

2019-10-29  本文已影响0人  孙宏志
SELECT
  date_format(task_submit_time, '%Y-%m-%d') AS date,
  count(1)                                  AS total_mum
FROM user_task_record
WHERE task_configuration_id = 17
GROUP BY date_format(task_submit_time, '%Y-%m-%d');

查询结果如下:

WeWork Helper20190911120638.png
上一篇下一篇

猜你喜欢

热点阅读