Answer upvote distribution

1

Please login or register to vote for this query.

(click on this box to dismiss)

How many upvotes are there on your site?

Stack Overflow

Q&A for programmers

-- Answer upvote distribution
-- How many upvotes are there on your site?

declare @VoteStats table (PostId int, up int) 

select up, count(*)
from (
  select PostId, count(*) as up
  from Votes
  where VoteTypeId = 2
  group by PostId
) a
group by up
order by up;

Enter Parameters

Options:
Switch sites:
loading Hold tight while we fetch your results
:records returned in :time ms:cached