Add SessionId to ac_PageViews table
Posted: Thu Apr 10, 2008 2:01 pm
The ac_PageViews table does not seem to have an easy way to measure "visits" or sessions. I'm looking to get a simple metric like this:
Can a SessionId column be added to this table to facilitate this?
Thanks,
-Nick
Code: Select all
SELECT
convert(char,ActivityDate,101) as [Period],
count(*) as [PageViews],
count(DISTINCT(UserId)) as [Visitors],
count(DISTINCT(SessionId)) as [Visits]
FROM
dbo.ac_PageViews
WHERE
convert(char, ActivityDate, 101) between @StartDate and @EndDate
GROUP BY
convert(char,ActivityDate,101)
Thanks,
-Nick