mysql查詢天天每週每個月每一年的數據方法

查詢天天的數據:sql SELECT COUNT(1) AS countNumber, DATE_FORMAT(createTime,'%Y-%m-%d') AS dateTime FROM testTable GROUP BY DATE_FORMAT(createTime,'%Y-%m-%d') 查詢每週的數據: SELECT COUNT(1) AS countNumber, WEEK
相關文章
相關標籤/搜索