;with feedback as( select p.owneruserid , u.reputation , ...


Please login or register to vote for this query.

(click on this box to dismiss)

Gardening and Landscaping

Q&A for gardeners and landscapers

;with feedback as(
select p.owneruserid
     , u.reputation
     , count(distinct pf.postid) [# of posts] 
     , sum(case when pf.votetypeid = 2 then 10 else 0 end) [Rep gained]
     , sum(case when pf.votetypeid = 3 then 2 else 0 end) [Rep lost]
from postfeedback pf
inner join posts p on p.id = pf.postid
inner join users u on u.id = p.owneruserid
where pf.creationdate between '2024-01-01' and '2024-02-01'
group by  p.owneruserid
     , u.reputation

select count(*)
from feedback

Enter Parameters

Switch to meta site
loading Hold tight while we fetch your results