sql中常用sql语句
按天来分组查询
select convert(varchar(10),addtime,120) from user_online_statis group by convert(varchar(10),addtime,120);
sql语句分页
select * from(
select row_number() over(order by addtime desc) rowid,count(1) over() as 'count',* from Taiwan_ActiveLog with(nolock) where activeid=10
)d where rowid>(2-1)*10 and rowid<=2*10