Hi
I'm getting confused with my joins in this query. I have a table holding:
viewID
SessionID
developmentID
There will be multiple viewID's for every developmentID and SessionID.
How can I count the number of different sessionID's for a specific DevelopmentID?
I am using the following, but it's giving me a list of sessionsID's with a count of viewsID's! In this particular case, I get 7 rows containing Session ID and ViewID's Count. But I need it to return 1 record which contains the Count of SessionID's. Which would be 7.
SELECT Count(s.SessionID)
FROM tblStatsSessions s, tblStatsPageViews p
WHERE p.SessionID = s.SessionID AND p.DevelopmentID=[@DevelopmentID]
Group By s.SessionID
Hope this all makes sense.
Thanks for your time.
Shaun
I'm getting confused with my joins in this query. I have a table holding:
viewID
SessionID
developmentID
There will be multiple viewID's for every developmentID and SessionID.
How can I count the number of different sessionID's for a specific DevelopmentID?
I am using the following, but it's giving me a list of sessionsID's with a count of viewsID's! In this particular case, I get 7 rows containing Session ID and ViewID's Count. But I need it to return 1 record which contains the Count of SessionID's. Which would be 7.
SELECT Count(s.SessionID)
FROM tblStatsSessions s, tblStatsPageViews p
WHERE p.SessionID = s.SessionID AND p.DevelopmentID=[@DevelopmentID]
Group By s.SessionID
Hope this all makes sense.
Thanks for your time.
Shaun