Short answers with highest score

0

Please login or register to vote for this query.

(click on this box to dismiss)

List the answers with the highest score on the site that are shorter than <Number>. The Len column shows the number of characters in the rendered HTML. The Com column shows the number of comments.

Interpersonal Skills

Q&A for people looking to improve their interpersonal communication skills

SELECT TOP ##Count##
  p.Id AS [Post Link],
  p.Score AS [Score],
  CASE
    WHEN p.Body LIKE '<p><a %' THEN '<a…>' + Right(p.Body, Len(p.Body)-CharIndex('>', p.Body, 5))
    ELSE Right(p.Body, Len(p.Body)-3)
  END AS [Body],
  Len(p.Body) AS [Len],
  p.CommentCount AS [#Com],
  p.OwnerUserId AS [User Link],
  CreationDate AS [Date]
FROM Posts p
WHERE p.PostTypeId = 2
AND Len(p.Body) < ##Maxlength##
ORDER BY p.Score DESC

Enter Parameters

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