Q&A about the site for Drupal developers and administrators
SELECT TOP(##num?500##) v.VoteTypeId, CASE v.VoteTypeId WHEN 1 THEN 'Accepted' WHEN 2 THEN 'UpMod' WHEN 3 THEN 'DownMod' WHEN 4 THEN 'Offensive' WHEN 5 THEN 'Favorite' WHEN 6 THEN 'Close' WHEN 7 THEN 'Reopen' WHEN 8 THEN 'BountyStart' WHEN 9 THEN 'BountyClose' WHEN 10 THEN 'Deletion' WHEN 11 THEN 'Undeletion' WHEN 12 THEN 'Spam' WHEN 15 THEN 'ModeratorReview' WHEN 16 THEN 'ApproveEditSuggestion' END, v.CreationDate, p.Id AS [Post Link] FROM Votes v INNER JOIN Posts p ON v.PostId=p.Id WHERE (p.OwnerUserId=##UserId##) AND (v.VoteTypeId IN (##types?2,3##)) AND (v.CreationDate >= '##Date1?2021-10-01##') AND (v.CreationDate <= '##Date2?2022-02-01##') ORDER BY v.CreationDate DESC ---1 = AcceptedByOriginator ---2 = UpMod (AKA upvote) ---3 = DownMod (AKA downvote) ---4 = Offensive ---5 = Favorite (AKA bookmark; UserId will also be populated) ---6 = Close (effective 2013-06-25: Close votes are only stored in table: PostHistory) ---7 = Reopen ---8 = BountyStart (UserId and BountyAmount will also be populated) ---9 = BountyClose (BountyAmount will also be populated) ---10 = Deletion ---11 = Undeletion ---12 = Spam ---15 = ModeratorReview (i.e., a moderator looking at a flagged post) ---16 = ApproveEditSuggestion