Question Close Flag Count

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
    PostId as [Post Link], 
    duplicate = sum(case when closereasontypeid = 101 then 1 else 0 end), 
    offtopic = sum(case when closereasontypeid = 102 then 1 else 0 end),
    unclear = sum(case when closereasontypeid = 103 then 1 else 0 end),
    toobroad = sum(case when closereasontypeid = 104 then 1 else 0 end),
    opinion = sum(case when closereasontypeid = 105 then 1 else 0 end),
    ot_superuser = sum(case when CloseAsOffTopicReasonTypeId = 4 then 1 else 0 end),
    ot_findexternal = sum(case when CloseAsOffTopicReasonTypeId = 8 then 1 else 0 end),
    ot_serverfault = sum(case when CloseAsOffTopicReasonTypeId = 7 then 1 else 0 end),
    ot_lackinfo = sum(case when CloseAsOffTopicReasonTypeId = 12 then 1 else 0 end),
    ot_typo = sum(case when CloseAsOffTopicReasonTypeId = 11 then 1 else 0 end)
from pendingflags
where 
	flagtypeid in (13,14)   -- Close flags
	and creationdate > '2014-04-15'
group by PostId

Enter Parameters

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