Find suspicious answers and comments to flag

1

Please login or register to vote for this query.

(click on this box to dismiss)

Science Fiction and Fantasy

Q&A for science fiction and fantasy enthusiasts

-- I just want to earn Marshal badge

DECLARE @LastWeek DateTime = dateadd(day, datediff(day, 8, GETDATE()), 0)

DECLARE @MinDate DateTime = DATEADD(MONTH, -23, GETDATE())

-- Comments that say thanks
SELECT TOP 1000
  Id [Comment Link]
FROM Comments
WHERE CreationDate > @MinDate
  AND LEN(Text) < 115
  AND (LOWER(Text) LIKE '%thank%'
   OR LOWER(Text) LIKE '%thnx%'
   OR LOWER(Text) LIKE '%thx%'
   OR LOWER(Text) LIKE '%wow%'
   )
  AND LOWER(Text) NOT LIKE '%but%'
--ORDER BY CreationDate DESC

-- Answers that are complained by the bot
SELECT TOP 400
  row_number() over (order by c.CreationDate) as Row,
  p.Id [Post Link],
  p.Body
FROM Posts p
JOIN Comments c ON p.Id = c.PostId
WHERE p.PostTypeId = 2
  AND p.DeletionDate IS NULL
  AND c.UserId = -1
  AND c.Text LIKE '%your answer is unclear%'
ORDER BY c.CreationDate DESC

-- Answers that are suspiciously short
SELECT TOP 100
  Id AS [Post Link],
  Body,
  LEN(Body) Length
FROM Posts
WHERE CreationDate >= @LastWeek
  AND DeletionDate IS NULL
  AND PostTypeId = 2
  AND LEN(Body) <= 120
ORDER BY Length ASC

Enter Parameters

Options:
Switch to meta site
loading Hold tight while we fetch your results