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