Where can I see if bounties were posted on a question at some point in the past, if those bounties w


Please login or register to vote for this query.

(click on this box to dismiss)


Stack Overflow

Q&A for professional and enthusiast programmers

select concat(
       , p.id
       , '|'
       , title) [Question]
     , concat(
       , p.id
       , '/timeline|'
       , title) [Timeline] 
     , pn.creationdate [Bounty start]
     , pn.deletiondate [Bounty ended]
from postnotices pn
inner join postnoticetypes pnt on pnt.id = pn.postnoticetypeid
inner join posts p on p.id = pn.postid
where classid = 2  -- bounty notice
and deletionuserid = -1  -- Community removed the bounty
and not exists (  -- no bounty was awarded 
  -- find awarded bounties for that post on that date
  select *
  from votes v 
  inner join posts bp on bp.id = v.postid
  where v.votetypeid = 9 -- bounty awarded
  and bp.parentid = p.id
  and v.creationdate = convert(date, pn.deletiondate) 

Enter Parameters

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