标签:
查询 2014年 每月消费额的总数,并排序:
SELECT sum(money),DATE_FORMAT(createtime,"%Y-%m") FROM `salary` where DATE_FORMAT(createtime,"%Y")=2014
group by DATE_FORMAT(createtime,"%m")
ORDER BY DATE_FORMAT(createtime,"%m") ASC;
标签:
原文地址:http://www.cnblogs.com/zhanggnol/p/4279558.html