Top 500 answerers on the site

0

Please login or register to vote for this query.

(click on this box to dismiss)

A list of the top 500 users with the highest average answer score excluding community wiki / closed posts or users with less than 10 answers

Physics

Q&A for active researchers, academics and students of physics

SET NOCOUNT ON 

DECLARE @Question 
TABLE (
  Id int, 
  PostTypeId tinyint,
  ParentId int,
  Body nvarchar(max), 
  Title nvarchar(250),
  Tags nvarchar(250)
)

DECLARE @Answer 
TABLE (
  Id int, 
  PostTypeId tinyint,
  ParentId int,
  Body nvarchar(max), 
  Title nvarchar(250),
  Tags nvarchar(250)
)

INSERT @Question
SELECT
  TOP 50
  Id,
  PostTypeId,
  ParentId,
  Body,
  Title,
  Tags
FROM Posts
WHERE tags like '%<##tag?python##>%' and PostTypeId = 1

INSERT @Answer
SELECT
  p.Id,
  p.PostTypeId,
  p.ParentId,
  p.Body,
  p.Title,
  p.Tags
FROM Posts p, @Question q
WHERE p.PostTypeId = 2 and p.ParentId = q.Id

SET NOCOUNT OFF

SELECT
  Id,
  PostTypeId,
  ParentId,
  Body,
  Title,
  Tags
FROM (
  SELECT *
  FROM @Question
  UNION SELECT *
  FROM @Answer
) AS p

Enter Parameters

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