以下为您演示MySQL常用的日期分组统计方法:

按月统计(一)

select date_format(create_time, '%Y-%m') mont, count(*) coun
from t_content
group by date_format(create_time, '%Y-%m');

按天统计(二)

SELECT
    date_format(created_at, '%Y-%m-%d') dat,count(*) count
FROM
    `fook_coupon_syn`

WHERE operation = 'OrderCode'
group by date_format(created_at, '%Y-%m-%d');

 

链接:https://blog.csdn.net/lpw_cn/article/details/89487801

相关文章:

  • 2021-12-22
  • 2022-12-23
  • 2022-02-08
  • 2021-07-10
  • 2022-02-08
猜你喜欢
  • 2022-01-26
  • 2022-12-23
  • 2022-02-08
  • 2022-02-08
相关资源
相似解决方案