7

I was just querying the stack exchange database, and I noticed that there are records in Votes for upvotes with null UserId.

SELECT COUNT(*)
FROM Votes
WHERE VoteTypeId = 2
  AND UserId IS NULL


-------- 
28433695 

(1 row(s) affected)

What functionality allows this to happen?

27

Votes on the Stack Exchange network are anonymous. The Data Explorer doesn't allow you to bypass that.

The user IDs are nulled on purpose for the public data dumps because otherwise it would be a serious breach of privacy. You'll notice that there isn't a single upvote with an attached UserId. Same for downvotes.

In fact that's the case with most of them. The only votes that are not anonymized are "Favorite" and "BountyStart" votes (types 5 and 8).

  • You are correct, sir! tyvm – Nick Vaccaro Apr 23 '13 at 18:53
  • It's good to know that votes are anonymous, now that I found out that favorites are not. – geekley Jul 17 '18 at 18:44
1

A small edit of your query makes it clear:

SELECT COUNT(*)
FROM Votes
WHERE VoteTypeId = 2
  AND UserId IS NOT NULL

- 
0 

(1 row(s) affected)

This is really just a comment.

You must log in to answer this question.

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