2

Almost identical to this SEDE query, I was trying to query for all my votes and determine how many were on questions, answers, and comments. Starting simply, I wanted to grab all my votes and their type - expecting results such as:

╔════════════════════════════════╦══════════╗
║ Post Link                      ║ Name     ║
╠════════════════════════════════╬══════════╣
║  Some awesome question's title ║ UpVote   ║
║  Not an answer                 ║ DownVote ║
║  etc...                        ║ ...      ║
╚════════════════════════════════╩══════════╝

But instead I got:

╔════════════════════════════════╦══════════╗
║ Post Link                      ║ Name     ║
╠════════════════════════════════╬══════════╣
║  A favorite question           ║ Favorite ║
║  Another favorite question     ║ Favorite ║
║  etc...                        ║ ...      ║
╚════════════════════════════════╩══════════╝

Therefore, for SO, I queried:

SELECT COUNT(*)
FROM Votes
WHERE UserId = ##UserId:Int##

The results were 22 - the number of my favorite posts. Is this as intended? I was working under the assumption that the Votes table would contain data on users' votes, not favorites. I realize I can count my votes another way:

SELECT UpVotes + DownVotes
FROM Users
WHERE Id = ##UserId:Int##

But that won't help me with my overall goal: to count the number of my votes on questions, answers, and comments separately. I don't necessarily want someone to create this query for me - I want to experiment with SEDE. But is this possible, or would this violate voting anonymity and is therefore impossible altogether? If possible, can someone point me in the correct direction?

Note: The idea for this query came about as I was curious about my progress towards the Civic Duty badge versus the Electorate badge. This SEDE query for Worst Case Scenario isn't quite what I want. And I don't really want to manually go through all my cast votes and count the number cast on questions.

5

The results were 22 - the number of my favorite posts. Is this as intended? I was working under the assumption that the Votes table would contain data on users' votes, not favorites.

Exact upvoting and downvoting data is kept private in SEDE to preserve voting anonymity. Most other vote types which are in the Votes table are public, however (such as Favorites and Bounties) -- they are also visible on your profile page.

But is this possible, or would this violate voting anonymity and is therefore impossible altogether?

No, it's not possible to fetch your votes per post type from SEDE. Exposing upvotes and downvotes with their post IDs would violate voting anonymity, and there are also no columns like "QuestionVoteCount" and "AnswerVoteCount" in the Users table.

|improve this answer|||||
  • Alas! I guess that means 'ye old manual way be the only way. – OhBeWise Aug 28 '15 at 17:23
  • 1
    @OhBeWise Yeah, you'll have to use the badge tracker on the Activity tab of your profile, or looking at the "Votes Cast" table on the same tab. – ProgramFOX Aug 28 '15 at 17:24

You must log in to answer this question.

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