SELECT DATEADD(month, DATEDIFF(month, 0, CreationDate), 0),

0

Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow на русском

Вопросы и ответы для программистов

SELECT
  DATEADD(month, DATEDIFF(month, 0, CreationDate), 0),
  COUNT(Distinct Id) 
FROM
  Posts 
WHERE  
  PostTypeId = 1
    AND
  ClosedDate IS NOT NULL 
GROUP BY 
  DATEADD(month, DATEDIFF(month, 0, CreationDate), 0)
ORDER BY 
  DATEADD(month, DATEDIFF(month, 0, CreationDate), 0);

Enter Parameters

Options:
Switch sites:
loading Hold tight while we fetch your results