最佳答案
在这个查询中,如何指定 mySQL 的 MONTH ()函数返回“08”而不是8?
I'd like the sort to work datewise. Currently getting results for date like
2006-9
2007-1
2007-10
2007-11
当前查询:
SELECT COUNT(*), CONCAT(YEAR(`datetime_added`), '-', MONTH(`datetime_added`)) as date FROM `person` WHERE (email = '' OR email IS NULL)
GROUP BY date
ORDER BY date ASC