Q&A about the site for biology researchers, academics, and students
declare @allPosts decimal(15,5) SELECT @allPosts = cast(COUNT(*) as decimal(15,5) ) FROM posts SELECT CAST(SUM(k) as decimal (15,5)) / @allPosts * 100 FROM ( SELECT TOP 1 PERCENT OwnerUserID , count(id) k FROM Posts p WHERE OwnerUserID > 0 GROUP BY OwnerUserID ORDER BY count(id) desc ) T