status-completed feature requests that are linked to a status-declined feature request

0

Please login or register to vote for this query.

(click on this box to dismiss)

Mythology

Q&A for enthusiasts and scholars of mythology and folklore

;with declined as (
  select p.postid
       , min(p.relatedpostid) [relatedpostid]
from postlinks p
inner join posttags pt on pt.postid = p.postid
inner join tags t on t.id = pt.tagid
where t.tagname in ('status-declined', 'feature-request')
group by p.postid
having count(*) > 1
)

select p.id [Post Link]
     , min(p.score) [score]
     , min(p.tags) [tags]
from posts p
inner join posttags pt on pt.postid = p.id
inner join tags t on t.id = pt.tagid
where t.tagname in ('status-completed', 'feature-request')
and exists (select * from declined where relatedpostid = p.id)
group by p.id
having count(*) > 1

Enter Parameters

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