Answered zombie sniper

0

Please login or register to vote for this query.

(click on this box to dismiss)

Quantum Computing

Q&A for engineers, scientists, programmers, and computing professionals interested in quantum computing

DECLARE @tags as nvarchar(35) = '##Tag##'
;


SELECT
  floor(q.Score + q.AnswerCount*10 + log(q.ViewCount, 10) / 10 - 10) as Weight,
  q.Score,
  q.AnswerCount as Answers,
  q.ViewCount,
  q.Id as "Post Link",
  q.Tags,
  q.ClosedDate,
  q.DeletionDate
FROM Posts q
WHERE q.PostTypeId = 1
  AND q.AnswerCount > 0
  AND q.ClosedDate IS NULL
  AND q.DeletionDate IS NULL
  AND NOT EXISTS (
    SELECT 1
    FROM Posts a
    WHERE a.ParentId = q.Id
      AND a.Score > 0
  )
  AND EXISTS (
    SELECT 1
    FROM Tags t, PostTags pt
    WHERE t.Id = pt.TagId
    AND t.TagName = @tags
    AND (q.Id = pt.PostId OR q.ParentId = pt.PostId)
  )
ORDER BY Weight DESC

Enter Parameters

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