Discussion in comments after moving comments to chat

0

Please login or register to vote for this query.

(click on this box to dismiss)

Philosophy

Q&A for those interested in the study of the fundamental nature of knowledge, reality, and existence

select
  Posts.Id as [Post Link],
  Posts.CreationDate,
  (select count(*) from Comments
    where PostId = Posts.Id and CreationDate > MovedToChat.CreationDate)
    as ExtraComments,
  (select max(CreationDate) from Comments
    where PostId = Posts.Id)
    as LastComment
from Posts, Comments MovedToChat
where
  MovedToChat.PostId = Posts.Id and
  MovedToChat.Text like 'Comments are not for extended discussion%' and
  exists(select * from Comments where
    Comments.PostId = Posts.Id and
    Comments.CreationDate > MovedToChat.CreationDate)
order by LastComment desc

Enter Parameters

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