Skip to main content
Adding code and average value for the answer to not be considered link-only...
Source Link
Sabito
  • 5k
  • 1
  • 17
  • 40

I tried an average on people having posted answers only

SELECT AVG(CASE WHEN nbAns >= 1 THEN Reputation END)
FROM (SELECT u.id as uid, COUNT(p.id) as nbAns
FROM Users as u
INNER JOIN Posts as p ON p.OwnerUserId = u.id
WHERE PostTypeId = 2
GROUP BY u.id) as countAns
INNER JOIN Users AS u on u.id = countAns.uid

Currently the average value is: 595

I tried an average on people having posted answers only

I tried an average on people having posted answers only

SELECT AVG(CASE WHEN nbAns >= 1 THEN Reputation END)
FROM (SELECT u.id as uid, COUNT(p.id) as nbAns
FROM Users as u
INNER JOIN Posts as p ON p.OwnerUserId = u.id
WHERE PostTypeId = 2
GROUP BY u.id) as countAns
INNER JOIN Users AS u on u.id = countAns.uid

Currently the average value is: 595

Source Link
Faeeria
  • 826
  • 4
  • 2

I tried an average on people having posted answers only