SELECT datepart(year, CreationDate) as 'year', Count(*) a...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Internet of Things Meta

Q&A about the site for builders and users of networked sensors and control devices in the contexts of smart homes, industry automation, or environmental sensors

SELECT 
  datepart(year, CreationDate) as 'year',
  Count(*) as Qtty, 
  SUM(ViewCount) as SView,
  AVG(ViewCount) as MView, 
  STDEV(ViewCount) as StdView,
  SUM(AnswerCount) as SAnswer,
  AVG(AnswerCount) as MAnswer,
  STDEV(AnswerCount) as StdAnswer,
  SUM(CommentCount) as SComment,
  AVG(CommentCount) as MComment,
  STDEV(CommentCount) as StdComment,
  SUM(FavoriteCount) as SFavorite,
  AVG(FavoriteCount) as MFavorite,
  STDEV(FavoriteCount) as StdFavorite,
  SUM(Score) as SScore,
  AVG(Score) as MScore,
  STDEV(Score) as StdScore
FROM Posts p
  INNER JOIN PostTags pt ON p.Id = pt.PostId
  INNER JOIN Tags t ON t.Id = pt.TagId
  WHERE (p.PostTypeId = 1) AND (t.TagName = 'crashlytics')
    AND CreationDate between '2013-01-01' and '2021-12-31'
GROUP BY datepart(year, CreationDate)
ORDER BY datepart(year, CreationDate) ASC;

Enter Parameters

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