MySQL常用SQL

willcoder 2016-09-19

DATE_FORMAT

SELECT DATE_FORMAT(ctime,'%Y-%m-%d') AS DATE,COUNT(1) AS amount FROM t_table_x t WHERE t.`ctime` >='2016-09-01' GROUP BY DATE_FORMAT(ctime,'%Y-%m-%d');

相关推荐

pythonpycharm / 0评论 2014-06-09