select distinct p.OwnerUserId, DATEPART(month, v.creation...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Japanese Language Meta

Q&A about the site for students, teachers, and linguists wanting to discuss the finer points of the Japanese language

select distinct
  p.OwnerUserId,
  DATEPART(month, v.creationdate) as Month,
  DATEPART(year, v.creationdate) as Year,
  sum(count(v.Id)*5) OVER(PARTITION BY DATEPART(year, v.creationdate) ORDER by DATEPART(month, v.creationdate)) as score
  from posts p 
  inner join votes v on v.postid = p.id
  where v.votetypeid = 2 AND p.OwnerUserId = 1 and p.posttypeid = 1 -- Q
  group by p.OwnerUserId, DATEPART(month, v.creationdate), DATEPART(year, v.creationdate)

Enter Parameters

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