WITH answered_posts AS( SELECT a.Id, a.CreationDate FROM ...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Academia Meta

Q&A about the site for academics and those enrolled in higher education

WITH answered_posts AS(
SELECT a.Id, a.CreationDate
FROM Posts a
WHERE a.PostTypeId = 2
AND year(a.CreationDate) >= '2020'
GROUP BY a.Id, a.CreationDate),

questions AS(
SELECT q.Id, q.CreationDate
FROM Posts q
WHERE q.PostTypeId = 1
AND year(q.CreationDate) = '2020'
GROUP BY q.Id, q.CreationDate)

SELECT COUNT(*)
FROM questions q
INNER JOIN answered_posts a
ON q.Id = a.Id;

Enter Parameters

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