Activity during Winter Bash 2019

0

Please login or register to vote for this query.

(click on this box to dismiss)

Windows Phone Meta

Q&A about the site for enthusiasts and power users of Windows Phone OS

WITH #Questions AS (
  SELECT CAST(CreationDate AS DATE) AS [Date], COUNT(*) AS [Count]
    FROM Posts  
    WHERE CreationDate BETWEEN '2019-10-01' AND '2020-01-31'
      AND PostTypeId = 1 -- Questions
    GROUP BY CAST(CreationDate AS DATE)
), #Users AS (
  SELECT CAST(CreationDate AS DATE) AS [Date], COUNT(*) AS [Count]
    FROM Users  
    WHERE CreationDate BETWEEN '2019-10-01' AND '2020-01-31'
    GROUP BY CAST(CreationDate AS DATE)
)
SELECT COALESCE(#Questions.Date, #Users.Date) AS 'Date',
  COALESCE(#Users.COUNT, 0) AS 'Number of users created',
  COALESCE(#Questions.COUNT, 0) AS 'Number of questions created',
  CASE WHEN COALESCE(#Questions.Date, #Users.Date)
    BETWEEN '2019-12-09' AND '2020-01-01'
    THEN 0 ELSE NULL END AS 'Winter Bash 2019'
  FROM #Questions
  FULL OUTER JOIN #Users
    ON #Questions.Date = #Users.Date
  ORDER BY COALESCE(#Questions.Date, #Users.Date)

Enter Parameters

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