Q&A for professional and enthusiast programmers
DECLARE @userId int = 159145; DECLARE @minLength int = 2 * 1024; SELECT TOP 1000 p.Id AS [Post Link], p.CreationDate, p.Score, LEN( p.Body ) AS PostLength, ROUND( p.Score / ( CONVERT( float, LEN( p.Body ) ) / 1024 ), 2 ) AS PointsPerKB, CASE WHEN p.LastEditDate > p.CreationDate THEN p.LastEditDate END AS LastEdited, CASE WHEN p.LastActivityDate > p.LastEditDate THEN p.LastActivityDate END AS LastActivityDate FROM Posts AS p WHERE p.PostTypeId = 2 /* Answers */ AND LEN( p.Body ) >= @minLength AND p.OwnerUserId = @userId ORDER BY PointsPerKB DESC;