declare @population int = (select count(distinct OwnerUse...


Please login or register to vote for this query.

(click on this box to dismiss)


Q&A for committed Christians, experts in Christianity and those interested in learning more

declare @population int = (select count(distinct OwnerUserId) from Posts)

select count(distinct OwnerUserId) "Users gaining reputation",
       @population "Total users",
       100.0*count(distinct OwnerUserId)/@population "% who gain"
from Posts p
     join Votes v on p.Id = v.PostId
where PostTypeId = 1
      and VoteTypeId = 2

Enter Parameters

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