/*SELECT COUNT(*) AS tuesdays FROM (SELECT * FROM Posts W...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Anime and Manga

Q&A for anime and manga fans

/*SELECT COUNT(*) AS tuesdays
FROM (SELECT *
      FROM Posts
      WHERE DATEPART(dw, CreationDate) = 7
      ) AS numTuesdays
WHERE PostTypeId = 2;*/

SELECT
(SELECT COUNT(*)
    FROM Posts
    WHERE DATEPART(dw, CreationDate) = 1
    ) AS sundays,
    (SELECT COUNT(*)
    FROM Posts
    WHERE DATEPART(dw, CreationDate) = 1
    ) AS mondays
FROM Posts
WHERE PostTypeId = 2

Enter Parameters

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