What % of Questions have a Score >0 or =0 or <0 in the last 4 weeks (daily)

1

Please login or register to vote for this query.

(click on this box to dismiss)

defaults to VBA & Excel questions but two other tags can be specified in the prompts

Physics

Q&A for active researchers, academics and students of physics

declare @sedeUpdate datetime = dateadd(d,-1,(select min(create_date) from sys.tables))


select
  datediff(d,creationdate,getdate()) as [Days Ago],
  format(creationdate, 'ddd MMM d') as [Date],
  count(*) as [#Questions],
  sum(case when score<0 then 1 else 0 end ) as [Score <0],
  sum(case when score=0 then 1 else 0 end ) as [Score =0],
  sum(case when score>0 then 1 else 0 end ) as [Score >0],
  format(1.0*sum(case when score>0 then 1 else 0 end )/count(*),'0%') as [% >0]
from posts
where 
  posttypeid=1
  and ( tags like '%' + ##tag1:string?vba>## + '%' or tags like '%' + ##tag2:string?excel## + '%' )
  and creationdate >= dateadd(d,-7*##weeksBack:int?4##,@sedeUpdate)
group by datediff(d,creationdate,getdate()), format(creationdate, 'ddd MMM d')
order by datediff(d,creationdate,getdate())
  
--tag1:Enter 1st partial or complete tag:"This one's default includes '>' to exclude irrelevant tags that contain 'vba' like '<navbar>'."
--tag2:Enter 2nd partial or complete tag:
--weeksBack:Query how many weeks back?"(number of weeks back, from the last SEDE data update.)"

Enter Parameters

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