日期:2014-05-18 浏览次数:20381 次
select avg(num) from tablea where createtime>='2012-04-07 00:00'createtime<='2012-04-07 10:00'
------解决方案--------------------
select avg(num) from tablea where createtime>=DATEADD(hh,-10,GetDate()) and createtime<= GetDate()