Matt,
Did you see/use the alias FROM table1 AS xx?
There are only 3 LandingPages in the sample database.
With this query
Code:
SELECT table1.LandingPage, table1.Keyword, Sum(table1.sessions) AS CountSessions
FROM table1
WHERE (((table1.keyword) In (SELECT TOP 15 xx.keyword
FROM table1 AS xx
WHERE xx.landingpage = table1.landingpage
GROUP BY xx.landingpage
,xx.keyword
ORDER BY xx.landingpage ASC
,sum(xx.sessions) DESC
)))
GROUP BY table1.LandingPage, table1.Keyword
ORDER BY table1.LandingPage, Sum(table1.sessions) DESC , table1.Keyword;
I get this result (partial display)
We still may not be on the same topic, but hopefully the subquery shows the basic set up involved.