None-Answered Questions By Tags


Please login or register to vote for this query.

(click on this box to dismiss)


Q&A for people studying math at any level and professionals in related fields

-- will hold our selected tags
create table #selectedtags(value nvarchar(35) collate SQL_Latin1_General_CP1_CS_AS)

-- fill selectedtags based on the ; delimited tags 
insert into
select rtrim(ltrim(value))
from string_split(##tags:string?winforms;linq##, ';')

-- select posts
select as [Post Link]
     , p.creationdate
     , p.score
     , p.tags
from posts p
inner join posttags pt 
        on pt.postid =  -- for each tag per post a row 
inner join tags t 
        on = pt.tagid  -- which tag
inner join #selectedtags st 
        on st.value = t.tagname -- select the tags
-- check if the post doesn't have more tags
where (select count(*) 
       from posttags pc 
       where pc.postid = and (p.answercount = 0 or p.acceptedanswerid is null)) = (select count(*) 
                                  from #selectedtags)
and closeddate is not null
-- have the exact count of tags                                 
group by 
     , p.creationdate
     , p.score
     , p.tags
having count(*) = (select count(*) 
                   from #selectedtags)

Enter Parameters

Switch sites:
loading Hold tight while we fetch your results