Trend of questions per year

0

Please login or register to vote for this query.

(click on this box to dismiss)

Android Enthusiasts Meta

Q&A about the site for enthusiasts and power users of the Android operating system

declare @thisYear int = datepart(year,getdate());

declare @posts table (
  year int not null,
  count int not null
)

insert into @posts
select
datepart(year,creationdate),
count(id)
from
posts
where
posttypeid = 1
and datepart(year,creationdate) < @thisYear
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