select zb.ZUser_RefererUrl as RefererUrl,zb.ZUser_Id as ID, zb.ZUser_Key as UserKey,zb.ZUser_SousuoKeyword as SousuoKeyword,zb.ZUser_BMobile as BMobile,zb.ZUser_Mobile as Mobile, zb.ZUser_Email as Email,zb.ZUser_Int1 as QQ,zb.ZUser_Str1 as UserPUK,zb.ZUser_Nickname as Nickname,zb.ZUser_StayTotalSecs as StayTotalSecs,ZUser_AddTime as AddTime
from ZbsUserInfo as zb
where ZUser_AddTime between '2015/10/14 0:00:00'
and '2015/10/15 23:59:59'
and zb.ZUser_StayTotalSecs>=-1
and zb.Sp_Id in ( 1,2,3,4,5,6,7,8,9,-1)
and zb.ZUser_Int1 >0
)
select * from
(
select ROW_NUMBER() OVER (ORDER BY AddTime desc ) as ZS,Count(*) over() as Total,*