Questions kept alive by your comments

2

Please login or register to vote for this query.

(click on this box to dismiss)

These questions would be automatically deleted by the RemoveAbandonedQuestions job, if they didn't have at least two comments. Some of these comments were written by you (or by the user whose user ID you've entered below, if not your own). If the feature request at http://meta.stackoverflow.com/q/333477 passes, these questions will be deleted. Would you like to convert any of your comments into answers before that happens?

Stack Overflow

Q&A for professional and enthusiast programmers

select
  Posts.Id as [Post Link],
  Posts.Score as [Score],
  Posts.ViewCount as [Views],
  Convert(Char(10), Posts.CreationDate, 127) as [Asked],
  Posts.CommentCount as [Comments],
  Count(*) as [By User],
  Sum(Comments.Score) as [Upvotes],
  -- http://stackoverflow.com/questions/273238/how-to-use-group-by-to-concatenate-strings-in-sql-server
  Stuff((
    select ' | ' + Cast(C.Text as VarChar(Max))
    from Comments as C
    where C.PostId = Posts.Id and C.UserId = ##UserId:int##
    for XML Path(''), Type
  ).value('(./text())[1]', 'VarChar(Max)'), 1, 3, '') as [Comment Text]
from Comments
  join Posts on Posts.Id = Comments.PostId
where Comments.UserId = ##UserId:int##
  and Posts.PostTypeId = 1
  and Posts.CreationDate <= DateAdd(Day, -##MinAge:int?365##, GetUTCDate())
  and Posts.Score between 0 and 1
  and (Posts.Score = 0 or Posts.OwnerUserId is null)
  and Posts.AnswerCount = 0
  -- TODO: add check for "is not locked" here
  and (##IgnoreViews:int?0## > 0 or 2 * Posts.ViewCount <= 3 * DateDiff(Day, Posts.CreationDate, GetUTCDate()))
  and Posts.CommentCount > 1
group by Posts.Id, Posts.Score, Posts.CommentCount, Posts.ViewCount, Posts.CreationDate
order by Posts.Id

-- UserId: User ID "Enter your (or someone else's) numerical user ID on the site here. You can find this in your user profile page URL."
-- MinAge: Minimum Q age (days) "Only list questions at least this many days old. The roomba only deletes questions older than 365 days."
-- IgnoreViews: Ignore view count (0/1) "If set to 1, list questions even if they're currently ineligible for deletion due to getting more than 2/3 views per day."

Enter Parameters

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