Trend of average score of positively received answers with [tag] by year of creation

0

Please login or register to vote for this query.

(click on this box to dismiss)

Woodworking

Q&A for professional and amateur woodworkers

declare @tag nvarchar(35) = ##tag:string##;
declare @min int = ##minimal:int?0##;

select 
  year(A.CreationDate) as Created,
  avg(A.Score)
from 
  Posts as A
  inner join Posts as Q on A.ParentId = Q.Id
where
  A.PostTypeId = 2
  and
  A.Score > @min
  and
  Q.ClosedDate is null
  and
  Q.Score > @min
group by 
  year(A.CreationDate)
order by
  Created

Enter Parameters

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