SELECT CAST(Posts.CreationDate AS DATE) AS Day, -- Use DA...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Open Data

Q&A for developers and researchers interested in open data

SELECT
  CAST(Posts.CreationDate AS DATE) AS Day, -- Use DATE to get the date part only
  Tags.TagName,
  COUNT(*) AS Questions
FROM Tags
  LEFT JOIN PostTags ON PostTags.TagId = Tags.Id
  LEFT JOIN Posts ON Posts.Id = PostTags.PostId
  LEFT JOIN PostTypes ON PostTypes.Id = Posts.PostTypeId
WHERE
  Tags.TagName = 'unity' AND -- Replace 'your_tag_here' with the tag you're interested in
  PostTypes.Name = 'Question' AND
  Posts.CreationDate >= DATEADD(month, -5, GETDATE()) AND -- Last 5 months
  Posts.CreationDate < DATEADD(DAY, 0, GETDATE()) -- Exclude today
GROUP BY
  CAST(Posts.CreationDate AS DATE), Tags.TagName
ORDER BY
  CAST(Posts.CreationDate AS DATE), Tags.TagName;

Enter Parameters

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