Bounty award // disconnect from acceptance // rep handling

0

Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow

Q&A for programmers

-- Enter Query Title
-- Enter Query Description

select
  p.owneruserid,
  v.*,
  case votetypeid
      when 1 then 15
      end accepted,
  case votetypeid
      when 8 then -bountyamount
      when 9 then bountyamount
      end bounty,
  case votetypeid
      when 2 then 10
      when 3 then -2
      else 0
      end rep
from votes v
inner join posts p on p.id = v.postid
inner join users u on u.id = p.owneruserid
where v.votetypeid in (1,2,3,8,9)
  and p.communityowneddate is null
  and
  (
    (u.id = 13249 and v.creationdate = '20101115')
    or
    (u.id = 315935 and v.creationdate = '20100505')
  )

order by p.owneruserid, v.id

Enter Parameters

Options:
Switch sites:
loading Hold tight while we fetch your results
:records returned in :time ms:cached