tags check

0

Please login or register to vote for this query.

(click on this box to dismiss)

Skeptics

Q&A for scientific skepticism

WITH p as (SELECT *, (CASE WHEN (Tags LIKE '%community%' OR
                              Tags LIKE '%moderators%' OR
                              Tags LIKE '%code-of-conduct%' OR 
                              Tags LIKE '%moderation%' OR
                              Tags LIKE '%advertising%' OR 
                              Tags LIKE '%company%')
                           THEN 'questions with trending tags' 
                           ELSE 'other questions' 
                       END
                   ) AS tagtype 
            FROM PostsWithDeleted
           )
SELECT 
  1.000*datepart(year,p.CreationDate)+1.000*datepart(week,p.CreationDate)/52 as [date],
  tagtype,
  count(Id)
FROM p
WHERE 
  PostTypeId = 1 AND 
  CreationDate BETWEEN '2019'+'-11-01' AND '2019'+'-12-010'
GROUP BY 
  1.000*datepart(year,CreationDate)+1.000*datepart(week,CreationDate)/52,
  tagtype
ORDER BY 
  1.000*datepart(year,CreationDate)+1.000*datepart(week,CreationDate)/52,
  tagtype

Enter Parameters

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