Rude or Abusive Language in Comments

0

Please login or register to vote for this query.

(click on this box to dismiss)

Joomla

Q&A for Joomla! administrators, users, developers and designers

SELECT c.CreationDate,
  CASE WHEN (2 = p.PostTypeId) THEN 'Answer'
       WHEN (1 = p.PostTypeId) THEN 'Question'
       ELSE                         'UNKNOWN'
       END AS Type, c.Id [Comment Link], c.Score, n.TotalComments,
  CASE WHEN (2 = p.PostTypeId) THEN t.Title
       ELSE                         p.Title
       END AS Title
FROM Comments c
  LEFT OUTER JOIN Posts p on (c.PostId = p.Id)
  LEFT OUTER JOIN Posts t on (p.ParentId = t.Id)
  LEFT OUTER JOIN (SELECT c.PostId, COUNT(c.PostId) TotalComments
FROM Comments c
GROUP BY c.PostId) n on (c.PostId = n.PostId)
WHERE
p.DeletionDate is NULL AND p.ClosedDate is NULL AND
(1 = p.PostTypeId or 2 = p.PostTypeId) AND

-- only needed on Stack Overflow
--c.CreationDate <= DATEADD(DAY, -1000, GETDATE()) AND
c.CreationDate >= DATEADD(DAY, -100, GETDATE()) AND

(1=2
-- Golden Hammer triggers
--OR UPPER(c.Text) LIKE UPPER('%fuck%')
--OR UPPER(c.Text) LIKE UPPER('%shit%')
--OR UPPER(c.Text) LIKE UPPER('%nigger%')

-- Normal flag rules apply
--OR UPPER(c.Text) LIKE UPPER('%piss%')
--OR UPPER(c.Text) LIKE UPPER('%retard%')
--OR UPPER(c.Text) LIKE UPPER('%jerk%')
--OR UPPER(c.Text) LIKE UPPER('%bitch%')
--OR UPPER(c.Text) LIKE UPPER('%nitwit%')
OR UPPER(c.Text) LIKE UPPER('%stupid%')

--OR (    UPPER(c.Text) LIKE UPPER( '%turd%')
--AND NOT UPPER(c.Text) LIKE UPPER('%sturday%')
--AND NOT UPPER(c.Text) LIKE UPPER('%sturdy%')
--)

-- End of query
)

Enter Parameters

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