Sum of top 1% of view counts (for real) [in last month]

0

Please login or register to vote for this query.

(click on this box to dismiss)

Craft CMS Meta

Q&A about the site for administrators, end users, developers and designers for Craft CMS

SELECT Count(*), sum(cast(subq.ViewCount as bigint)) FROM 
  (SELECT TOP 100 PERCENT ViewCount, Id FROM Posts 
    where ViewCount > 0
    AND PostTypeId = 1
    AND ClosedDate is NULL
    AND CommunityOwnedDate is null
    --AND CHARINDEX('<python>', Tags) > 0
    
    --AND datediff(day, creationdate, GETDATE()) < 600
    --AND datediff(day, creationdate, GETDATE()) > 544
    
  ORDER BY ViewCount DESC) AS subq;

Enter Parameters

Options:
Switch sites:
loading Hold tight while we fetch your results