Using the Stack Exchange Data Explorer for Stack Overflow, I’m looking for aggregated counts of review tasks (suggested edits) per user, but I’ve lost track of the tables involved (ReviewTaskResults, SuggestedEditVotes, etc.). I can’t imagine the base query is that hard to compose.

How to get all completed approved/rejected/improved edit suggestion reviews a user has done?

  • None of the tables around reviewtasks contain the user who performed the reviewtask so you can't answer this question. You'll need to scrape the review history.
    – rene
    Aug 17, 2016 at 10:08
  • @rene: That's a setback. I could rephrase the question: Where does the data come from to display “Community has approved 297542 edit suggestions and rejected 155813 edit suggestions and improved 1209 edit suggestions”?
    – dakab
    Aug 17, 2016 at 10:32

1 Answer 1


I think this query is what you are after:

DECLARE @UserId int = ##UserId##
select top 10
       rtk.Id [Review Id]
,      sed.Id [Suggested Edit Link]
,      sed.PostId [Post Link]
,      rtt.Name [Review End Result]
,      vte.Name [Your Vote]
from   ReviewTaskResults rtr
join   ReviewTaskResultTypes rtt
on     rtr.ReviewTaskResultTypeId = rtt.Id
join   ReviewTasks rtk
on     rtr.ReviewTaskId = rtk.Id
join   SuggestedEdits sed
on     sed.Id = rtk.SuggestedEditId
join   SuggestedEditVotes sev
on     sev.SuggestedEditId = sed.Id
join   VoteTypes vte
on     sev.VoteTypeId = vte.Id
where  sev.UserId = @UserId

It gets all suggested edits votes of you and joins that with the end result of the review task and your vote on it.

I would suggest to try this query on a low-traffic site since it will blow up the database using SO.

  • blowing up stuff ...
    – rene
    Aug 17, 2016 at 10:57

You must log in to answer this question.

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