dhl:SQL-统计每天的PV和UV

--PV:
select page as 地址,convert(char(10),createtime,120) as 时间,count(*) as 访问量
from dbo.WebAppLog
where convert(char(10),createtime,120)>='2010-06-01'  and  Page='http://app.pingco.cn/NewCall/Call.mvc/index'
group by page, convert(char(10),createtime,120)
order by convert(char(10),createtime,120)

--UV:
select max(page) as 地址, convert(char(10),createtime,120) as 时间,count(distinct(mobile)) as 人数
from dbo.WebAppLog
where convert(char(10),createtime,120)>='2010-06-01' and page = 'http://app.pingco.cn/NewCall/Call.mvc/index'
group by convert(char(10),createtime,120)
order by convert(char(10),createtime,120)

posted @ 2010-06-18 16:08  肚肚  阅读(1632)  评论(0编辑  收藏  举报