Number of views on questions by users with up to a specified reputation

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

DECLARE @MaxRep int

select    @MaxRep, SUM(convert(bigint,p.viewcount)) "No. views"
  from    Posts p
LEFT JOIN Users u ON u.id = p.OwnerUserId
  where   p.posttypeid = 1
  and     @MaxRep in (1,10,100,1000,10000,100000,1000000)
  and     u.Reputation <= @MaxRep

Enter Parameters

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