Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 158 Stack Exchange communities.

What is meta?
Here's how it works:
  1. Any Stack Exchange user can ask a question
  2. The community provides support, votes on ideas, and reports bugs
  3. Your voice helps shape the way Stack Exchange operates

This page on StackOverflow says:

muntoo had 371 edit suggestions approved, and 36 edit suggestions rejected.

This query on Data.SE says:

Total Edits: 267

Maybe I just suck at SQL (I do; I don't even know what SELECT means!), but why do they disagree?

share|improve this question
Data.SE isn't querying the real database, it's using a monthly(?) dump. – Jeremy Banks Sep 4 '11 at 4:06
@Jeremy Might as well post that as the answer :) – Matthew Read Sep 4 '11 at 4:09
@MatthewRead: Thanks, but I didn't want to post as an answer because I didn't know the details. I feel less bad about putting no effort into a comment. – Jeremy Banks Sep 4 '11 at 4:10
up vote 10 down vote accepted

The query makes the assumption that you are the last editor of the post (i.e., LastEditorUserId is your user ID) which isn't always guaranteed to be true, because someone could have easily made an edit after you did. This is why the PostHistory table exists, since it contains the full revision history for any given post.

Additionally, as Jeremy Banks points out, the data used by the Data Explorer isn't always up-to-date, so even in the case of valid queries the Data Explorer results can occasionally lag behind those of the actual sites. To check when the data was last updated, you can take a look at the Data Explorer main page and find the date above for "most recent" in each site listing (image courtesy Michael Mrozek):

example of most recent update location

This value is also shown in the sidebar of the queries page. In this particular case, the data is relatively fresh, so the variance caused by that shouldn't be too significant.

share|improve this answer
So how should I write the query? (This is my first time SQLing, and I haven't read any manuals.) – Mateen Ulhaq Sep 4 '11 at 5:09

You must log in to answer this question.

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