Longest answers by user with votes and chars-per-vote

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

SELECT
  p.id as [Post Link],
  Convert(int, Len(p.Body) * (1+Score)/1000)/Convert(int, Len(p.Body)/(1+Score)) AS "PunchCost",
  Len(p.Body) AS Length,
  Score AS Votes,
  Convert(int, Len(p.Body)/(1+Score)) AS Cost,
  Convert(int, Len(p.Body) * (1+Score)/1000) AS Punch
  
FROM Users u, Posts p 
WHERE p.OwnerUserId = ##UserId##
  AND u.Id = p.OwnerUserId
  AND p.PostTypeId = 2
  AND Score >= 0

ORDER BY PunchCost DESC, Punch DESC, Cost DESC, Length DESC, Votes DESC

Enter Parameters

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