Number of answers in a given period

0

Please login or register to vote for this query.

(click on this box to dismiss)

Science Fiction and Fantasy

Q&A for science fiction and fantasy enthusiasts

select null as [User Link]
     , count(*) [total]
     , sum(case when deletiondate is null then 1 else 0 end) [# undeleted]
     , sum(case when deletiondate is not null then 1 else 0 end) [# deleted]
from postswithdeleted
where posttypeid = 2
and creationdate between '##start?2019-01-01##' and '##end?2019-07-01##'
union
select top 1000
       owneruserid as [User Link]
     , count(*) [total answers]
     , count(*)
     , null
from posts
where  posttypeid = 2
and creationdate between '##start?2019-01-01##' and '##end?2019-07-01##'
and owneruserid > 0
group by owneruserid
order by count(*) desc

Enter Parameters

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