Table of population as a function of post score

1

Please login or register to vote for this query.

(click on this box to dismiss)

table of population as a function of post score https://chat.stackexchange.com/transcript/message/49594379#49594379

Physics

Q&A for active researchers, academics and students of physics

SELECT A.Score, A.Count, ROUND(A.Count/ (CAST(B.Total AS float)) * 100, 5) as '%age'

FROM

(SELECT
  Score,
  COUNT(Id) AS 'Count'
  FROM Posts
  GROUP BY Score) AS A

JOIN

(SELECT
  COUNT(Id) AS 'Total'
  FROM Posts) AS B

ON 1=1

ORDER BY '%age' DESC, 'Score' DESC

Enter Parameters

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