MySQL统计函数记录——按月、按季度、按日、时间段统计以及MySQL日期时间函数大全
按年汇总,统计:select sum(mymoney) as totalmoney, count(*) as sheets from mytable group by date_format(col, '%Y');按月汇总,统计: select sum(mymoney) as totalmoney, count(*) as sheets from mytable group by date_for...
转载
2018-06-08 11:55:29 ·
6484 阅读 ·
1 评论