Question posted with most associated comments (Q&A's comments) given the specified tag and duration


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 10 p1.title AS "Question",
          '' + CAST( AS VARCHAR) AS "URL",
          (p1.CommentCount + p3.NUM) AS "Number of Comments"
    from  Posts p1, PostTypes ptypes1, PostTags ptags1, Tags t1,
            select   SUM(p2.CommentCount) AS "NUM", p2.ParentId AS "ID"
              from   Posts p2, PostTypes ptypes2
             where   p2.posttypeid =
               and = 2
          group by   p2.ParentId
          ) AS p3
   where = p3.ID
     and  p1.posttypeid =
     and = 1
     and = ptags1.postid 
     and  ptags1.tagid = 
     and  t1.tagname = '##TagName##'
     and  p1.CreationDate >= '##startdate##'
     and  p1.CreationDate <= '##enddate##'
order by  "Number of Comments" DESC

Enter Parameters

Switch sites:
loading Hold tight while we fetch your results