mysql按照天、月份、年份統計查詢

按月份查詢im SELECT *  FROM tbl_order GROUP BY DATE_FORMAT(CreateTime,'%Y-%m');查詢 SELECT sum(money), DATE_FORMAT(CreateTime,'%Y-%m')  FROM tbl_order GROUP BY DATE_FORMAT(CreateTime,'%Y-%m'); co 按天查詢 SELECT
相關文章
相關標籤/搜索