Accept rate by user

1

Please login or register to vote for this query.

(click on this box to dismiss)

History of Science and Math

Q&A for people interested in the history and origins of science and mathematics

SELECT top 100
  u.id as [User Link],
  COUNT(1) AS answers_count,
  SUM(case when q.id is null then 0 else 1 end) as accepted_count
FROM users u
JOIN posts a
  ON u.id = a.owneruserid
  AND a.posttypeid = 2
left join posts q on a.parentid = q.id and q.posttypeid = 1
   and a.id = q.acceptedanswerid 
GROUP BY u.id
order by SUM(case when q.id is null then 0 else 1 end)*1.0/COUNT(1) desc

Enter Parameters

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