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_
相关文章
相关标签/搜索