It is know that many questions have the same body and title, So I wanted to create a query to show them all, but this don't work :
select Posts.id as [Post Link], -- Question title. Count(PendingFlags.PostId) as [Number of pending flags], -- Number of pending flags per questions. Posts.OwnerUserId as [User Link], Reputation as [User Reputation], -- Interesting to see that such questions are sometimes asked by high rep users. Posts.Score as [Votes], Posts.ViewCount, Posts.AnswerCount as [Number of Answers], Posts.FavoriteCount as [Number of Stars], -- Some questions seems to be very helpfull :) . Posts.CreationDate as [Asked on], -- The older is the question, the more is the chance that flags on them can't get reviewed. Posts.LastActivityDate as [last activity], -- Similar effect as with Posts.CreationDate. Posts.LastEditDate as [modified on] from posts LEFT OUTER JOIN Users on Users.id = posts.OwnerUserId LEFT OUTER JOIN PendingFlags on PendingFlags.PostId = Posts.Id where ClosedDate IS NULL -- The question is not closed. AND LOWER(body) = LOWER(Posts.title) -- This condition doesn't work : the query doesn't return any results... group by Posts.id, Posts.OwnerUserId, body, Reputation, Posts.Score, Posts.FavoriteCount, Posts.AnswerCount, Posts.CreationDate, Posts.LastActivityDate, Posts.LastEditDate, Posts.ViewCount order by Count(PendingFlags.PostId) desc; -- Questions with more flags have more chance to get them handled, and the higher is the probabilty that the question is off-topic (since several users already reviewed the question).