select TOP ##Limit:int?38369## Posts.Id as [Post Link], -...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow

Q&A for professional and enthusiast programmers

select 
TOP ##Limit:int?38369## 
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], -- Let click on the colum to see if the same user ask off-topic questions often. 
Reputation as [User Reputation], -- Interesting to see that such questions are sometimes asked by high rep users. 
Posts.Score as [Votes], -- Interesting to see that some questions have more than 100 upvotes. 
Posts.AnswerCount as [Number of Answers], -- I thought we shouldn't answer on off-topic post. 
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], 
Posts.ViewCount -- How many peoples were too dumb to not close the question. 
from Posts 
LEFT OUTER JOIN Users on Users.id = Posts.OwnerUserId 
INNER JOIN PendingFlags on PendingFlags.PostId = Posts.Id 
LEFT OUTER JOIN FlagTypes on FlagTypes.Id = PendingFlags.FlagTypeId -- I want to add the flag reson and their types (real flags or close votes) 
where Posts.ClosedDate IS NULL -- The question is not closed. 
group by Posts.id, Posts.OwnerUserId, 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).

Enter Parameters

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