Rasa Questions

0

Please login or register to vote for this query.

(click on this box to dismiss)

Sports

Q&A for participants in team and individual sport activities

-- all questions
select DATEADD(WEEK, DATEDIFF(WEEK, 0, posts.CreationDate), 0) as date, tags.TagName as tag, count(posts.Id) as questions, 'total' as Type
into #total_questions
from PostTags post_tags, Tags tags, posts posts
where 
  post_tags.TagId = tags.Id and 
  tags.TagName in ('rasa-core', 'rasa-nlu') and
  posts.Id = post_tags.PostId
group by
 DATEADD(WEEK, DATEDIFF(WEEK, 0, posts.CreationDate), 0), tags.TagName;

-- questions with count answer < 1
select DATEADD(WEEK, DATEDIFF(WEEK, 0, posts.LastActivityDate), 0) as date, tags.TagName as tag, count(posts.Id) as questions, 'no answers' as Type
into #questions_without_answers
from PostTags post_tags, Tags tags, posts posts
where 
  post_tags.TagId = tags.Id and 
  tags.TagName in ('rasa-core', 'rasa-nlu') and
  posts.Id = post_tags.PostId and
  posts.AnswerCount < 1
group by
 DATEADD(WEEK, DATEDIFF(WEEK, 0, posts.LastActivityDate), 0), tags.TagName;

-- questions without ticked answers
select DATEADD(WEEK, DATEDIFF(WEEK, 0, posts.LastActivityDate), 0) as date, tags.TagName as tag, count(posts.Id) as questions, 'no answers' as Type
into #questions_without_ticked_answers
from PostTags post_tags, Tags tags, posts posts
where 
  post_tags.TagId = tags.Id and 
  tags.TagName in ('rasa-core', 'rasa-nlu') and
  posts.Id = post_tags.PostId and
  posts.AnswerCount < 1
group by
 DATEADD(WEEK, DATEDIFF(WEEK, 0, posts.LastActivityDate), 0), tags.TagName;
 
select x.date, sum(x.questions) as questions, sum(x.not_answered) as not_answered
from
  (select date, tag, questions, '0' as not_answered
   from #total_questions
   union 
   select date, tag, '0' as questions, questions
   from #questions_without_answers) as x
group by x.date


select top(100) * 
from posts;

Enter Parameters

Options:
Switch to meta site
loading Hold tight while we fetch your results