matt,
Do you have a few sample records you could post?
Suggestions:
Code:
'TopLandingPagesBySessionCount
SELECT TOP 15 MattFinalT.LandingPage
, Count(MattFinalT.SessionID) AS CountOfSessionID
FROM MattFinalT
GROUP BY MattFinalT.LandingPage
ORDER BY Count(MattFinalT.SessionID) DESC;
Code:
SELECT TOP 15 MattFinalT.Keyword
, MattFinalT.LandingPage
, Count(MattFinalT.SessionID) AS CountOfSessionID1
FROM MattFinalT INNER JOIN TopLandingPagesBySessionCount
ON MattFinalT.LandingPage = TopLandingPagesBySessionCount.LandingPage
GROUP BY MattFinalT.Keyword, MattFinalT.LandingPage
ORDER BY Count(MattFinalT.SessionID) DESC;
Code:
table_name field_name ordinal_position data_type length
MattFinalT ID 0 Long 4
LandingPage 1 Text 255
SessionID 2 Long 4
Keyword 3 Text 255
These queries do not deal with ties.