liquidmagic
-
5/13/2011 3:23:28 PM
How can I get the TOP articles statistics for a specific node
Hello,
I was to create a repeater with a custom query that will return the top articles (based on impressions) for a specific node.
Normally, I would use something like this for top articles from every part of the site: SELECT DocumentNamePath, NodeName, NodeAliasPath, articleTitle, datestamp, smallDescription, SUM(HitsCount) FROM Analytics_Statistics, Analytics_DayHits, View_SDay_Articles_Joined WHERE (StatisticsSiteID = 1) AND (StatisticsCode='pageviews') AND (StatisticsID = HitsStatisticsID) AND (StatisticsObjectID = NodeID) AND (StatisticsObjectCulture = DocumentCulture) AND (HitsStartTime >= DATEADD(dd,-1, GETDATE())) GROUP BY DocumentNamePath, NodeName, NodeAliasPath, articleTitle, datestamp, smallDescription ORDER BY SUM(HitsCount) DESC
But what about a node. So, if I have an article under the node Products and I have the repeater on this page I want to have the top articles under Products.
Any idea/would be appreciated.
Dimitris
|