Well-received questions/day history

1

Please login or register to vote for this query.

(click on this box to dismiss)

Well received means: score>0, not closed, not deleted. 10 Q/D is the criteria for beta graduation.

Physical Fitness Meta

Q&A about the site for physical fitness professionals, athletes, trainers, and those providing health-related needs

SELECT
  DATEFROMPARTS(
    DATEPART(yyyy, CreationDate),
    DATEPART(mm, CreationDate),
    DATEPART(d, CreationDate)) AS Day,
  COUNT(*) AS [All Questions],
  COUNT(CASE WHEN Score > 0 AND ClosedDate IS NULL AND DeletionDate IS NULL
    THEN 1 ELSE NULL END) AS [Liked Questions]
  /*
  COUNT(*) AS [All Questions],
  COUNT(COALESCE(ClosedDate, DeletionDate)) AS [Closed Questions],
  COUNT(DeletionDate) AS [Deleted Questions]
  */
FROM PostsWithDeleted
WHERE PostTypeId = 1
GROUP BY 
  DATEFROMPARTS(
    DATEPART(yyyy, CreationDate),
    DATEPART(mm, CreationDate),
    DATEPART(d, CreationDate))
ORDER BY Day DESC

Enter Parameters

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