DL question askers per month

0

Please login or register to vote for this query.

(click on this box to dismiss)

Russian Language

Q&A for students, teachers, and linguists wanting to discuss the finer points of the Russian language

WITH
q as (

SELECT
 Posts.Id as Id,
 Posts.CreationDate as CreationDate,
 Posts.AcceptedAnswerId as AcceptedAnswerId,
 Tags.TagName as TagName
FROM Tags
  LEFT JOIN PostTags ON PostTags.TagId = Tags.Id
  LEFT JOIN Posts ON Posts.Id = PostTags.PostId
  LEFT JOIN PostTypes ON PostTypes.Id = Posts.PostTypeId

WHERE
  Tags.TagName IN (
    'tensorflow',
    'pytorch',
    'keras'
  ) AND
  
  Year(Posts.CreationDate) > 2015
  
  AND
  
  PostTypes.Name = 'Question'
  
),
m as (

SELECT
  DATEADD(mm, (Year(q.CreationDate) - 1900) * 12 + Month(q.CreationDate) - 1, 0) AS Month,
  COUNT(*) AS Questions

FROM q
  
GROUP BY
  Year(q.CreationDate), Month(q.CreationDate), q.TagName


),
ma as (

SELECT
  DATEADD(mm, (Year(q.CreationDate) - 1900) * 12 + Month(q.CreationDate) - 1, 0) AS Month,
  COUNT(*) AS Questions

FROM q LEFT JOIN Posts as a ON q.AcceptedAnswerId = a.Id

WHERE
  DATEDIFF(DAY, q.CreationDate, a.CreationDate) < 30
  
GROUP BY
  Year(q.CreationDate), Month(q.CreationDate), q.TagName

)


SELECT m.Month, sum(m.Questions) as Questions, 10000*sum(ma.Questions)/(1e-9+sum(m.Questions)) as SolvedQuestions
FROM m JOIN ma on m.Month=ma.Month
GROUP BY
  m.Month

Enter Parameters

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