Posts edited after down-vote

1

Please login or register to vote for this query.

(click on this box to dismiss)

スタック・オーバーフロー

プログラマーとプログラミングに熱心な人々のための質問と回答

-- You can see the meaning of VoteType by (SELECT * FROM VoteTypes)
DECLARE @DownVote tinyint = 3

SELECT
  Posts.LastEditDate,
  (CASE WHEN Posts.PostTypeId = 1 THEN 'Q'
        WHEN Posts.PostTypeId = 2 THEN 'A'
        ELSE '?' END) AS 'Q/A',
  Posts.Score,
  Posts.Id AS [Post Link],
  Posts.Tags
FROM
  Votes JOIN Posts ON Votes.PostId = Posts.Id
WHERE
  Votes.VoteTypeId = @DownVote AND
  Posts.LastEditDate > Votes.CreationDate
GROUP BY
  Posts.Id,
  Posts.LastEditDate,
  Posts.Score,
  Posts.PostTypeId,
  Posts.Tags
ORDER BY
  Posts.LastEditDate DESC
OFFSET 0 ROWS
FETCH NEXT 100 ROWS ONLY

Enter Parameters

Options:
Switch sites:
loading Hold tight while we fetch your results