题目写的不太贴切~

表数据如上
select a.account,sum(a.fund) as heji,a.createtime from (select * from tb_test04 where createtime>='2015-7-8'
and createtime<='2015-7-10') a
where a.account='001' and a.createtime='2015-7-8' group by a.account,a.createtime
查询的结果是
account heji createtime
001 25 2015-07-08 00:00:00.000
不过,我想要的是,同时把几个account的fund求和结果都求出来,查询结果类似这样子
account heji createtime
001 25 2015-07-08 00:00:00.000
002 25 2015-07-08 00:00:00.000
001 20 2015-07-09 00:00:00.000
002 25 2015-07-09 00:00:00.000
001 60 2015-07-10 00:00:00.000
002 40 2015-07-10 00:00:00.000
用我上面写的sql语句,要修改where条件,查询6次才能查出来上面的结果
我的问题是,怎么用一条sql语句就查出来上面的结果呢?是不是要写存储过程,目前我只会写简单的sql语句,还不会写存储过程,求大家不吝指导
求帮忙,感激······
------解决思路----------------------
根据你的account与 createtime 进行分组,分组之后再求sum