php+ mysql 下 求根据时间范围 统计 某一指定参数下的数据的语句
如下的 一张 表里 想求 2015年1月 到2015年2 月 这个时间端内 a的 value剩余 以及b的剩余
uid user1 value time
1 a 12000 2015-1-1
2 b 4000 2015-1-2
3 a -3000 2015-1-3
4 a -600 2015-1-4
5 b 2000 2015-1-8
编程新手 ,很多东西不懂. 答题的朋友如果同时也知道怎么用PHP把这个表体现出来.我愿意出钱征求.同时求师傅PHP师傅一位.有意的朋友留一下联系方式
参考如下:
select user1,sum(value)balance