摘要: 首先,将按条件查询并排序的结果查询出来。 1 mysql> select accepttime,user,job from tuser_job where user =8 order by accepttime desc; 2 +---------------------+------+-----... 阅读全文
posted @ 2015-07-27 15:53 Tcool 阅读(7055) 评论(0) 推荐(0) 编辑
摘要: 1 select DATE_FORMAT(createtime,'%Y-%m'),count(*) from test where user =8 group by DATE_FORMAT(createtime,'%Y-%m');//按月统计数据2 select DATE_FORMAT(create... 阅读全文
posted @ 2015-07-27 14:11 Tcool 阅读(6557) 评论(0) 推荐(0) 编辑