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.