Questions tagged with [tag] that never got an answer

0

Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow

Q&A for professional and enthusiast programmers

declare @tag nvarchar(35) = '<' + ##Tag:string## + '>';
declare @totalPosted bigint;
declare @totalUnanswered bigint;

set @totalPosted = (
    select 
      count(Id) 
    from 
      Posts 
    where 
      PostTypeId = 1 and 
      charindex(@tag, Tags) > 0
  );
  
set @totalUnanswered = (
    select 
      count(Id) 
    from 
      Posts 
    where 
      PostTypeId = 1 and 
      charindex(@tag, Tags) > 0
      and
      AcceptedAnswerId is null
  );

select
  count(Id) as [No answers],
  @totalPosted as [Total Posted],
  @totalUnanswered * 100 /  @totalPosted as [Unanswered %],
  count(Id) * 100 / @totalPosted as [No answer %]
from
  Posts
where
  PostTypeId = 1
  and
  charindex(@tag, Tags) > 0
  and
  AnswerCount = 0

Enter Parameters

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