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)

Stack Overflow

Q&A for professional and enthusiast programmers

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 to meta site
loading Hold tight while we fetch your results