Q&A anon feedback

1

Please login or register to vote for this query.

(click on this box to dismiss)

Given a question id, what is all the anon feedback for the question and the answers?

Stack Overflow

Q&A for programmers

select
  P.id as [Post Link],
  case P.PostTypeId
    when 1 then 'Q'
    when 2 then 'A'
    else '?'
  end as "Q/A",
  case PF.VoteTypeID
    when 2 then '+'
    when 3 then '-'
    else '?'
  end as "+/-/?",
  count(1) as AnonVotecount,
  Q.viewCount as viewCount,
  P.Score as Score,
  U.DisplayName as Author
from
  Posts Q
  left join Posts A on (Q.id = A.ParentId)
  join Posts P on (P.id = Q.id or P.id = A.id)
  left join PostFeedback PF on (PF.PostId = P.id)
  left join Users U on (U.id = P.OwnerUserid)
where
  Q.id = ##QuestionId:int##
  and PF.IsAnonymous = 1
group by
  P.id, P.PostTypeId, PF.VoteTypeID,
  P.viewcount, Q.viewcount, P.Score,
  U.DisplayName
order by
  P.id

Enter Parameters

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