Answer Score/Byte Ratio

0

Please login or register to vote for this query.

(click on this box to dismiss)

This query returns the score/byte ratio of your answers.

Code Review

Q&A for peer programmer code reviews

DECLARE @UserId int = ##UserId##

SELECT
  a.Id as [Post Link],
  Len(a.Body) as Length,
  a.Score,
  b.ViewCount,
  100.0 * a.Score / Len(a.Body) as 'Score Per 100 Bytes',
  100.0 * a.Score / b.ViewCount as 'Score Per 100 Views'
FROM 
  Posts a inner join Posts b on a.ParentId = b.Id
WHERE 
  a.OwnerUserId = @UserId and a.PostTypeId = 2 and a.Score > 0
  ORDER BY 'Score Per 100 Bytes' DESC

Enter Parameters

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