Reputation per answer

1

Please login or register to vote for this query.

(click on this box to dismiss)

Network Engineering

Q&A for network engineers

DECLARE @UserId int = ##UserId##

SELECT u.Id, u.Reputation, COUNT(p.Id) Answers, (CAST(Reputation AS Float) / CAST(COUNT(p.Id) AS Float)) RepPerAnswer 
FROM Users u LEFT JOIN Posts p ON (u.Id = P.OwnerUserId)
WHERE PostTypeId = 2 AND u.Id = @UserId
GROUP BY u.Id, u.Reputation

Enter Parameters

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