/*SELECT Id, Score, CreationDate FROM (SELECT * FROM Post...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Open Source Meta

Q&A about the site for people organizing, marketing or licensing open source development projects

/*SELECT Id, Score, CreationDate
FROM
  (SELECT *
   FROM Posts p
   WHERE YEAR(CreationDate) = 2020
   )AS postsYear2020
WHERE MONTH(CreationDate) = 2*/

/*SELECT
(SELECT COUNT(*)
 FROM Posts
 WHERE DATEPART(dw, CreationDate) = 1 AND PostTypeId = 2
 ) AS sundayPosts,
 (SELECT COUNT(*)
  FROM Posts
  WHERE DATEPART(dw, CreationDate) = 2 AND PostTypeId = 2
  ) AS mondayPosts,
  (SELECT COUNT(*)
    FROM Posts
    WHERE DATEPART(dw, CreationDate) = 3 AND PostTypeId = 2
    ) AS tuesdayPosts,
    (SELECT COUNT(*)
    FROM Posts
    WHERE DATEPART(dw, CreationDate) = 4 AND PostTypeId = 2
    )AS wednesdayPosts,
    (SELECT COUNT(*)
     FROM Posts
     WHERE DATEPART(dw, CreationDate) = 5 AND PostTypeId = 2
     ) AS thursdayPosts,
     (SELECT COUNT(*)
      FROM Posts
      WHERE DATEPART(dw, CreationDate) = 6 AND PostTypeId = 2
      ) AS fridayPosts,
      (SELECT COUNT(*)
    FROM Posts
    WHERE DATEPART(dw, CreationDate) = 7 AND PostTypeId = 2
    ) AS saturdayPosts*/
    
    SELECT COUNT(*)
    FROM(Posts p INNER JOIN Posts u ON DATEPART(dw, u.CreationDate) = 2 AND u.PostTypeId = 2)

Enter Parameters

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