I have this query in SEDE to try to find possible not an answers to flag. (I already went through a lot of them, for Stack Overflow, so I don't really recommend anyone else using this one since isn't that helpful anymore.)
As you can see, it looks to be a lot longer and redundant than it probably needs to be. Is there any way to shorten this?
SELECT
p.Id as [Post Link],
len(p.Body),
p.CreationDate as Date
FROM
Posts as p
JOIN
Users as u
ON
p.OwnerUserId = u.Id
JOIN
Posts as q
ON
p.ParentId = q.Id
WHERE
u.Reputation < 126
and
len(p.Body) < 300
and
p.Body LIKE '%a href=%'
and
p.Score < 3
and
p.PostTypeId = 2
and
p.CommentCount < 3
and
q.ClosedDate IS NULL
and
q.FavoriteCount < 3
and
q.CommunityOwnedDate IS NULL
and
q.Body NOT LIKE '%plugin%' COLLATE SQL_Latin1_General_CP1_CI_AS
and
q.Title NOT LIKE '%plugin%' COLLATE SQL_Latin1_General_CP1_CI_AS
and
q.Body NOT LIKE '%plug-in%' COLLATE SQL_Latin1_General_CP1_CI_AS
and
q.Title NOT LIKE '%plug-in%' COLLATE SQL_Latin1_General_CP1_CI_AS
and
q.Body NOT LIKE '%tool%' COLLATE SQL_Latin1_General_CP1_CI_AS
and
q.Title NOT LIKE '%tool%' COLLATE SQL_Latin1_General_CP1_CI_AS
and
q.Title NOT LIKE '%framework%' COLLATE SQL_Latin1_General_CP1_CI_AS
and
q.Body NOT LIKE '%framework%' COLLATE SQL_Latin1_General_CP1_CI_AS
and
q.Title NOT LIKE '%API%'
and
q.Body NOT LIKE '%API%'
and
q.Title NOT LIKE '%IDE%'
and
q.Body NOT LIKE '%IDE%'
and
q.Title NOT LIKE '%library%' COLLATE SQL_Latin1_General_CP1_CI_AS
and
q.Body NOT LIKE '%library%' COLLATE SQL_Latin1_General_CP1_CI_AS
and
q.Title NOT LIKE '%cms%' COLLATE SQL_Latin1_General_CP1_CI_AS
and
q.Body NOT LIKE '%cms%' COLLATE SQL_Latin1_General_CP1_CI_AS
and
q.Title NOT LIKE '%open source%' COLLATE SQL_Latin1_General_CP1_CI_AS
and
q.Body NOT LIKE '%open source%' COLLATE SQL_Latin1_General_CP1_CI_AS
and
q.Body NOT LIKE '%application%' COLLATE SQL_Latin1_General_CP1_CI_AS
and
q.Title NOT LIKE '%application%' COLLATE SQL_Latin1_General_CP1_CI_AS
and
q.Body NOT LIKE '%software%' COLLATE SQL_Latin1_General_CP1_CI_AS
and
q.Title NOT LIKE '%software%' COLLATE SQL_Latin1_General_CP1_CI_AS
and
q.Body NOT LIKE '%tutorial%' COLLATE SQL_Latin1_General_CP1_CI_AS
and
q.Title NOT LIKE '%tutorial%' COLLATE SQL_Latin1_General_CP1_CI_AS
and
q.Body NOT LIKE '%book%' COLLATE SQL_Latin1_General_CP1_CI_AS
and
q.Title NOT LIKE '%book%' COLLATE SQL_Latin1_General_CP1_CI_AS
and
q.Body NOT LIKE '%module%' COLLATE SQL_Latin1_General_CP1_CI_AS
and
q.Title NOT LIKE '%module%' COLLATE SQL_Latin1_General_CP1_CI_AS
and
q.Body NOT LIKE '%resource%' COLLATE SQL_Latin1_General_CP1_CI_AS
and
q.Title NOT LIKE '%resource%' COLLATE SQL_Latin1_General_CP1_CI_AS
and
q.Body NOT LIKE '%engine%' COLLATE SQL_Latin1_General_CP1_CI_AS
and
q.Title NOT LIKE '%engine%' COLLATE SQL_Latin1_General_CP1_CI_AS
and
q.Body NOT LIKE '%lightweight%' COLLATE SQL_Latin1_General_CP1_CI_AS
and
q.Title NOT LIKE '%lightweight%' COLLATE SQL_Latin1_General_CP1_CI_AS
and
q.Body NOT LIKE '%opensource%' COLLATE SQL_Latin1_General_CP1_CI_AS
and
q.Title NOT LIKE '%opensource%' COLLATE SQL_Latin1_General_CP1_CI_AS
and
q.Body NOT LIKE '%technologies%' COLLATE SQL_Latin1_General_CP1_CI_AS
and
q.Title NOT LIKE '%technologies%' COLLATE SQL_Latin1_General_CP1_CI_AS
and
q.Body NOT LIKE '%simulator%' COLLATE SQL_Latin1_General_CP1_CI_AS
and
q.Title NOT LIKE '%simulator%' COLLATE SQL_Latin1_General_CP1_CI_AS
and
q.Body NOT LIKE '%compiler%' COLLATE SQL_Latin1_General_CP1_CI_AS
and
q.Title NOT LIKE '%compiler%' COLLATE SQL_Latin1_General_CP1_CI_AS
and
q.Body NOT LIKE '%editor%' COLLATE SQL_Latin1_General_CP1_CI_AS
and
q.Title NOT LIKE '%editor%' COLLATE SQL_Latin1_General_CP1_CI_AS
ORDER BY
len(p.Body) ASC