标签:技术 mys group 分享图片 style collect rom src _for
<!-- 按日查询--> SELECT DATE_FORMAT(created_at,‘%Y-%m-%d‘) as day, SUM(COUNT) FROM collect GROUP BY day; <!-- 按周查询--> SELECT DATE_FORMAT(created_at,‘%Y-%u‘) as day, SUM(COUNT) FROM collect GROUP BY day; <!-- 按月查询--> SELECT DATE_FORMAT(created_at,‘%Y-%m‘) as day, SUM(COUNT) FROM collect GROUP BY day; <!-- 按年查询--> SELECT DATE_FORMAT(created_at,‘%Y‘) as day, SUM(COUNT) FROM collect GROUP BY day;
标签:技术 mys group 分享图片 style collect rom src _for
原文地址:https://www.cnblogs.com/zyulike/p/10125969.html