论坛如何获取一周内的发帖量
论坛如何获取一周内的前10个用户的发帖量
[解决办法]
select count(*) as topiccount, first(userid) from topictable where date between 2012-03-01 and 2012-03-31 group by userid order by topiccount
[解决办法]
select top 10 userid from table where timecreate between time1 and time2 group by id order by COUNT(0)desc
[解决办法]
group by userid
[解决办法]
select top 10 from table where datediff(week,endtime,getdate())=0
查询一周内的数据,可以动态给值