select case when rtr.ReviewTaskResultTypeId = 1 then 'Not...

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
  case when rtr.ReviewTaskResultTypeId = 1 then 'Not Sure'
       when rtr.ReviewTaskResultTypeId = 5 then 'Edit'
       when rtr.ReviewTaskResultTypeId = 6 then 'Close'
       when rtr.ReviewTaskResultTypeId = 8 then 'Do Not Close'
       end [Reason],
  count(rtr.Id) [Count]
from ReviewTasks rt
inner join ReviewTaskResults rtr on rt.Id = rtr.ReviewTaskId
where rt.ReviewTaskTypeId = 2 --close votes
group by rtr.ReviewTaskResultTypeId

Enter Parameters

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