Q&A for active researchers, academics and students of physics
-- Minimum number of answers a user must have written to be included.
DECLARE @MinAnswers int = ##MinAnswers##
Users.Id AS [User Link],
SUM(Posts.Score) AS "Upvotes",
COUNT(*) AS "Answers",
1.0 * SUM(Posts.Score) / COUNT(*) AS "Ave. score",
MAX(Posts.Score) AS "Highest score",
1.0 * MAX(Posts.Score) / SUM(Posts.Score) AS "Fraction votes from highest scoring answer"
FROM Posts LEFT JOIN Users
ON Posts.OwnerUserId = Users.Id
WHERE Posts.PostTypeId = 2
GROUP BY Users.Id
HAVING COUNT(*) >= @MinAnswers
ORDER BY "Ave. score" DESC