create table tb(g_id int,vtime datetime,shu int)
go
insert into tb select 1,'2006-8-9 8:22:09',100
union all
select 2,'2006-8-9 8:22:09',100
union all
select 3,'2006-8-10 8:22:09',100
union all
select 4,'2006-8-10 8:22:09',100
select DATENAME(DAY,vtime)+'日',sum(shu) from tb group by vtime
---------------------
9日 200
10日 200