日期:2014-05-17 浏览次数:20694 次
SELECT distinct CONVERT(char(10), Dt,126) as '统计时间',sum([F_REGCOUNT]) as '注册量'
FROM [Datagram].[dbo].[RegisterCount] with(nolock)
where CONVERT(char(10), Dt,126) between '2013-05-01' and '2013-05-04'
group by CONVERT(char(10), Dt,126)
order by CONVERT(char(10), Dt,126)
SELECT distinct CONVERT(char(10), Dt,126) as '统计时间'
,[MaxOnline] as '最高在线'
,[AvgOnline] as '平均在线'
FROM [Datagram].[dbo].[DayOnlineCount] with(nolock)
where CONVERT(char(10), Dt,126) between '2013-05-01' and '2013-05-04'
select distinct CONVERT(char(10), F_TIME,126) as '统计时间',
F_BACKNUM as '返回人数' from REPORT.DBO.USERNUM
where CONVERT(char(10), F_TIME,126) between '2013-05-01' and '2013-05-04'
"统计时间" '注册量' '最高在线' '平均在线' '返回人数'
select * from
(
SELECT distinct CONVERT(char(10), Dt,126) as '统计时间',sum([F_REGCOUNT]) as '注册量'
FROM [Datagram].[dbo].[RegisterCount] with(nolock)
where CONVERT(char(10), Dt,126) between '2013-05-01' and '2013-05-04'
group by CONVERT(char(10), Dt,126)
order by CONVERT(char(10), Dt,126)
) A,
(
SELECT distinct CONVERT(char(10), Dt,126) as '统计时间'
,[MaxOnline] as '最高在线'
,[AvgOnline] as '平均在线'
FROM [Datagram].[dbo].[DayOnlineCount] with(nolock)
where CONVERT(char(10), Dt,126) between '2013-05-01' and '2013-05-04'
)
B,
(
select distinct CONVERT(char(10), F_TIME,126) as '统计时间',
F_BACKNUM as '返回人数' from REPORT.DBO.USERNUM
where CONVERT(char(10), F_TIME,126) between '2013-05-01' and '2013-05-04'
) C where A.统计时间=B.统计时间 and A.统计时间=C.统计时间
create proc promuha
as
begin
set nocount on;
with a as
(SELECT distinct CONVERT(char(10), Dt,126) as '统计时间',sum([F_REGCOUNT]) as '注册量'
FROM [Datagram].[dbo].[RegisterCount] with(nolock)
where CONVERT(char(10), Dt,126) between '2013-05-01' and '2013-05-04'
group by CONVERT(char(10), Dt,126)),
b as
(SELECT distinct CONVERT(char(10), Dt,126) as '统计时间'
,[MaxOnline