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_
相關文章
相關標籤/搜索