.Text Stats: Top 10 Agg Views

Below is the SQL for getting the top 10 blog posts by number of aggregator views. Just replace the value of the UserName to match your blog's virtual directory.

Some caveats to running this SQL. This was written for version 0.95.2004.102 of .Text and hasn't been tested with any other versions. And in order to actually run the SQL, you must have access to the database with all the .Text stored procedures.

DECLARE @blogID int

/* Get blog ID */
SELECT @blogID = BlogID
FROM blog_Config
WHERE UserName = 'dave'   /* Replace value here */

SELECT TOP 10
    a.EntryID,
    a.AggCount,
    b.Title
FROM blog_EntryViewCount a JOIN blog_Content b
ON a.EntryID = b.[ID]
WHERE a.BlogID = @blogID AND b.PostConfig = 93
ORDER BY a.AggCount DESC

Print | posted on Tuesday, March 22, 2005 8:53 PM
Comments have been closed on this topic.