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


Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow Meta en español

Preguntas y respuestas sobre el sitio para programadores y profesionales de la informática

select distinct
  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 =
  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

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