List of past bounties on a SE site

0

Please login or register to vote for this query.

(click on this box to dismiss)

https://meta.stackexchange.com/questions/307406/list-of-past-bounties-on-a-se-site/307426?noredirect=1#comment999884_307426

Stack Overflow

Q&A for professional and enthusiast programmers

with awarded as
( 
select v.postid
     , v.bountyamount
     , v.creationdate
     , p.parentid questionid
     , p.owneruserid 
     from votes v
     inner join posts p on p.id = v.postid 
     where v.votetypeid = 9 -- award 
)

select top ##maxrows?100##
'site://q/' + cast(v.postid as nvarchar)+ '|' + q.title as [Question]
     , v.bountyamount
     , v.creationdate
     , v.userid as [User Link]
     , a.postid as [Post Link]
     , a.bountyamount
     , a.owneruserid as [User Link]
from votes v
inner join posts q on q.id = v.postid
left outer join awarded a 
  on v.postid = a.questionid 
 and a.creationdate 
 between v.creationdate 
 and dateadd(d, 8, v.creationdate)
where v.votetypeid = 8 -- bounty start
order by v.creationdate desc

Enter Parameters

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