mysql按天数据统计

例:

SELECT DATE_FORMAT(`create_time`, '%Y-%m-%d') AS days,COUNT(1) AS num FROM `dc_loan_aa_orders` GROUP BY DATE_FORMAT(`create_time`, '%Y-%m-%d') ORDER BY create_time DESC

结果集如下:

 

posted @ 2018-10-09 16:34  007少侠  阅读(281)  评论(0编辑  收藏  举报
友情链接:便宜vps(CN2GIA线路)
站长统计: