ok, I have three tables usagedata, subsites, and sitepages and I'm trying to grab the aggregate usage data and grab the URL path which is in the subsites table but I have to join through sitepages. this is the query i want to run:


SELECT Sum(u.HitCount) AS TotalHits, sp.title, ss.SubSiteURL
FROM UsageData u JOIN Sitepages sp
     ON u.PageID=sp.ID JOIN subsites ss
          ON sp.SubSiteID=ss.ID
GROUP BY title
ORDER BY TotalHits DESC


but I get this error: "Column 'ss.SubSiteURL' is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause."


So my question is, how can i grab that one last column to get the dataset that I really need?


TIA,


John Venable
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to