SELECT YEAR(p.CreationDate) AS [Year], MONTH(p.CreationD...


Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow

Q&A for programmers

SELECT YEAR(p.CreationDate)  AS [Year],
       MONTH(p.CreationDate) AS [Month],
       DAY(p.CreationDate)   AS [Day],
       COUNT(*)              AS [QuestionsAskedToday],
       SUM(COUNT(*)) OVER () AS [Total]
FROM   Posts p
       INNER JOIN PostTags pt
         ON = pt.postid
       INNER JOIN Tags t
         ON = pt.tagid
WHERE  t.tagname = 'android'
       AND p.CreationDate > '2011-01-01 00:00:00'
GROUP  BY YEAR(p.CreationDate),
ORDER  BY YEAR(p.CreationDate),
          MONTH(p.CreationDate) DESC,
          DAY(p.CreationDate) DESC            

Enter Parameters

Switch sites:
loading Hold tight while we fetch your results