mysql查詢所有日期,怎樣查詢一個時間范圍內(nèi)?
SELECT
DATE_FORMAT( datetime列, '%Y-%m-%d' ) AS 日期,
SUM( ... ) AS 合計,
COUNT( ... ) AS 行數(shù)
FROM
表
GROUP BY
DATE_FORMAT( datetime列, '%Y-%m-%d' )
SELECT
DATE_FORMAT( datetime列, '%Y-%m-%d' ) AS 日期,
SUM( ... ) AS 合計,
COUNT( ... ) AS 行數(shù)
FROM
表
GROUP BY
DATE_FORMAT( datetime列, '%Y-%m-%d' )