SELECT TOP 100 p.Id as [Post Link], COUNT(v.PostId)/p.Ans...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Gardening and Landscaping Meta

Q&A about the site for gardeners and landscapers

SELECT
  TOP 100
  p.Id as [Post Link],
  COUNT(v.PostId)/p.AnswerCount as RecentUpvotes,
  p.Score,
  p.ViewCount,
  p.AnswerCount,
  MAX(a.Score) As HighestAnswerScore
FROM Posts as p
JOIN Votes v ON v.PostId = p.Id
JOIN Posts a -- Answers
  ON a.ParentId = p.Id
  AND a.PostTypeId = 2 -- Only Answers

WHERE v.VoteTypeId = 2 -- Only Upvotes
  AND v.CreationDate > '2019-04-01'
  AND p.ViewCount > 1000
GROUP BY p.Id, p.Score, p.ViewCount, p.AnswerCount
HAVING MAX(a.Score) < 3
ORDER BY RecentUpvotes DESC

Enter Parameters

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