52

My question is quite simple: Is there a way to get a "breakdown" of my People Reached stat, ie. how many people I have reached with each individual answer, or which answer has contributed most ?

So some way to get the number of views for each question where I posted an answer.

I've played around a bit in SEDE, but I'm unable (I'm no good at SQL..) to put together a query which shows me how many views each question where I posted an answer has.

4
  • 1
    I don't think the algorithm has been released, so I'd guess not.
    – jonrsharpe
    Commented May 1, 2015 at 12:58
  • 4
    @jonrsharpe They covered it pretty thoroughly here, actually. Commented May 1, 2015 at 13:08
  • @BillyMailman good to know, thank you
    – jonrsharpe
    Commented May 1, 2015 at 13:10
  • 1
    That was an excellent read, @Billy. Quite sobering though, to read how it ever got started ... (Do click on the first 'guidance' link.)
    – Jongware
    Commented May 1, 2015 at 13:32

1 Answer 1

36

If you simply want to see the most-viewed questions to which you've supplied a positively-scored answer, you can use this query in SEDE:

SELECT QuestionPosts.Title, QuestionPosts.Id,  QuestionPosts.ViewCount
FROM Posts AnswerPosts
JOIN Posts QuestionPosts
ON AnswerPosts.ParentId = QuestionPosts.Id
WHERE AnswerPosts.PostTypeId = 2
  AND AnswerPosts.Score > 0
  AND AnswerPosts.OwnerUserId = ##UserId##
ORDER BY QuestionPosts.ViewCount DESC

(In the Data Explorer interface, you'll need to use the user ID from your own profile URL to populate the ##UserId## variable.)

However, this query is a lot more permissive than the actual algorithm. In particular, the real algorithm only considers answers where:

Also meets one or more of the following criteria:

  • In the top 3 answers OR
  • Is the Accepted Answer OR
  • Score >5 OR
  • Has at least 20% of the total vote count

We can add in the middle two criteria with the WHERE predicate:

  AND (AnswerPosts.Score > 5 OR
       QuestionPosts.AcceptedAnswerId = AnswerPosts.Id)

But this is now more restrictive than the real algorithm. The other two conditions are more complicated and require additional subqueries to pull down all the answers for each question and compare each of your answers to every other answer.

1

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .