select year(CreationDate) as PostYear, count(*) as TotalP...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow

Q&A for professional and enthusiast programmers

select year(CreationDate) as PostYear, count(*) as TotalPosts from Posts 
  where 
  1=1 and
  year(CreationDate) between '2008' and '2018'
group by year(CreationDate) 
order by year(CreationDate)
 
-- Getting Total Votes Per Year
select year(CreationDate) as VoteYear, count(*) as TotalVotes from Votes 
  where 
  1=1 and
  year(CreationDate) between '2008' and '2018'
group by year(CreationDate) 
order by year(CreationDate)

Enter Parameters

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