My Effortposts (answers over 2KB, ordered by points-per-KB)

0

Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow

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;

Enter Parameters

Options:
Switch to meta site
loading Hold tight while we fetch your results