日期:2014-05-17 浏览次数:20604 次
select id,convert(varchar(10),createtime,120),sum(sellnum) from a group by id,convert(varchar(10),createtime,120)
select
convert(varchar(10),createtime,120) as createDate,
sum(sellnum) as sumSellnum
from a
group by convert(varchar(10),createtime,120)