首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 数据库 > SQL Server >

怎么按天分组

2012-02-03 
如何按天分组我要统计endtime和starttime之间(20070825到20070829)之间的endtime和starttime时间差的和怎

如何按天分组
我要统计   endtime   和starttime之间(20070825     到   20070829)
之间  
的endtime   和starttime   时间差的和  

怎么做

[解决办法]
講得不大清楚哦。。
[解决办法]
具体算什么
[解决办法]
楼主把表里的数据都贴出来吧,再把结果贴一下,我们就明白你要什么了
[解决办法]
你的点播时间怎么计算的啊?
[解决办法]
要统计 endtime 和starttime之间(20070825 到 20070829)
之间
的endtime 和starttime 时间差的和

select convert(varchar(10),date,120) date, sum(col) 统计字段
from tb
where date > = '2007-08-25 ' and date <= '2007-08-29 '
group by convert(varchar(10),date,120)

热点排行