select v.CreationDate, sum(case t.Name when 'UpMod' then 10

0

Please login or register to vote for this query.

(click on this box to dismiss)

Drupal Answers Meta

Q&A about the site for Drupal developers and administrators

select
 v.CreationDate,
 sum(case t.Name
  when 'UpMod' then 10
  when 'AcceptedByOriginator' then 15
  else 0 end) as Rep
from
 Votes v
 inner join VoteTypes t on t.Id = v.VoteTypeId
 inner join Posts p on p.Id = v.PostId
where
 p.OwnerUserId = ##UserId## 
group by
 v.CreationDate
order by
 v.CreationDate 

Enter Parameters

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