Q&A for people interested in the history and origins of science and mathematics
-- Gained reputation per answer weighted by popularity. -- Answer's (reputation / popularity) ratio per post for a given user DECLARE @UserId int = ##UserId## SELECT ROUND( (CAST(a.Score * 10 + (CASE WHEN q.AcceptedAnswerId = a.Id THEN 15 ELSE 0 END) AS float) / CAST(q.ViewCount AS float)) * 100, 3) AS [Rep/Views Ratio], q.Id AS [Post Link], CASE WHEN q.AcceptedAnswerId = a.Id THEN N'✔' ELSE '' END AS [✔], a.Score AS Score, a.Score * 10 + (CASE WHEN q.AcceptedAnswerId = a.Id THEN 15 ELSE 0 END) AS Rep, q.ViewCount AS Views FROM Posts a INNER JOIN Posts q ON q.Id = a.ParentId WHERE a.PostTypeId = 2 AND a.OwnerUserId = @UserId ORDER BY [Rep/Views Ratio] DESC