Top score in answer between two dates in a specific tag (non-CW)

1

Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow Meta en español

Preguntas y respuestas sobre el sitio para programadores y profesionales de la informática

SELECT TOP(##num?500##)
  RANK() OVER(ORDER BY SUM(a.Score) DESC) AS [Rank],
  a.OwnerUserId AS [User Link], a.OwnerDisplayName,
  SUM(a.Score) AS [Total Score],
  COUNT(a.Id) AS [Count],
  AVG(CAST(a.Score AS Decimal)) AS [Average]
FROM Posts q INNER JOIN Posts a ON a.ParentId=q.Id
  INNER JOIN PostTags pt ON q.Id=pt.PostId
  INNER JOIN Tags t ON t.id = pt.TagId
  WHERE (t.TagName=##tag:string?support##) 
  AND (a.CreationDate >= '##Date1?2020-01-01##') AND (a.CreationDate <= '##Date2?2021-01-01##')
  AND (a.CommunityOwnedDate IS NULL)  
  ---AND (PostTypeId=2) ---answers
GROUP BY a.OwnerUserId, a.OwnerDisplayName
ORDER BY SUM(a.Score) DESC

Enter Parameters

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