Голоса за закрытие и переоткрытие

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
  u.Id, u.DisplayName, u.UpVotes Up, u.DownVotes Down,
  SUM(CASE WHEN vt.name = 'Close' THEN 1 ELSE 0 END) [Close],
  SUM(CASE WHEN vt.name = 'Reopen' THEN 1 ELSE 0 END) Reopen,
  SUM(CASE WHEN vt.name = 'Offensive' THEN 1 ELSE 0 END) Offensive,
  SUM(CASE WHEN vt.name = 'Spam' THEN 1 ELSE 0 END) Spam,
  SUM(CASE WHEN vt.name = 'Deletion' THEN 1 ELSE 0 END) Deletion,
  SUM(CASE WHEN vt.name = 'Undeletion' THEN 1 ELSE 0 END) Undeletion,
  SUM(CASE WHEN vt.name = 'ModeratorReview' THEN 1 ELSE 0 END) Moderator,
  SUM(CASE WHEN vt.name = 'ApproveEditSuggestion' THEN 1 ELSE 0 END) ApproveEdit,
  SUM(CASE WHEN vt.name = 'BountyStart' THEN 1 ELSE 0 END) BountyStart,
  SUM(CASE WHEN vt.name = 'BountyClose' THEN 1 ELSE 0 END) BountyClose,
  count(1) Total
from
  Votes v
  inner join Users u on v.UserId = u.Id
  inner join VoteTypes vt on v.VoteTypeId = vt.Id
where v.UserId in (216198,213987,178988,210178,204271,186999,17609,15479,229681)
group by u.Id, u.DisplayName, u.UpVotes, u.DownVotes

select * from VoteTypes

select * from Votes where UserId in (216198,213987,/*178988,*/210178,204271,186999,17609,15479,229681)

Enter Parameters

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