Questions with suspiciously bad titles in a given tag

0

Please login or register to vote for this query.

(click on this box to dismiss)

Show questions with suspiciously bad titles, sorted by decreasing badness. The badness is a heuristic mainly based on the number of views, with a premium for score and a quadratic back-off for longer titles.

Android Enthusiasts

Q&A for enthusiasts and power users of the Android operating system

-- Questions with suspiciously bad titles in a given tag
-- Show questions with suspiciously bad titles, sorted by decreasing badness.
-- The badness is a heuristic mainly based on the number of views, with a
-- premium for score and a quadratic back-off for longer titles.

DECLARE @tag nvarchar(25) = ##tag:string##
--SET @tag = Replace(Replace(Replace(Replace(@tag, '-', 'ö'), '+', 'ç'), '#', 'ñ'), '.', 'û')

SELECT
  q.Id As [Post Link],
  q.Score As [Score],
  q.AnswerCount As [Answers],
  q.ViewCount As [Views],
  (q.ViewCount / 2 + q.Score
   + (SELECT Sum(a.Score) FROM Posts a WHERE a.ParentId = q.Id)
   - (Len(q.Title) - 8) * Len(q.Title)) As [Badness]
FROM Posts q
WHERE q.PostTypeId = 1
  AND q.Title LIKE '%question%'
  AND Replace(Replace(q.Tags, 'à', '>'), 'é', '<') LIKE '%<' + @tag + '>%'
  AND q.ClosedDate IS NOT NULL
ORDER BY Badness DESC

Enter Parameters

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