Answer Ratio Candidates

7

Please login or register to vote for this query.

(click on this box to dismiss)

Identify undervalued questions that may benefit from a second answer.

Genealogy and Family History Meta

Q&A about the site for expert genealogists and people interested in genealogy or family history

-- get posts from recently active users where the user votes,
-- and the question has no accepted answers, and there is only
-- one answer, and that answer is not highly voted.

declare @tag as nvarchar(25) = ##tag:string?all##
;

create table #postids (
    PostId int primary key not null 
    )

if isnull(@tag, 'all') = 'all' or rtrim(lower(@tag)) = ''
begin

    insert into #postids
    select id
    from posts
    where posttypeid = 1

end else begin

    insert into #postids
    select PostId
    from PostTags, Tags
    where TagName = lower(@tag)
      and TagId = Id

end

select
    p.Score as Score,
    p.OwnerUserId as [User Link],
    DateDiff(Day, p.CreationDate, CURRENT_TIMESTAMP) as [Age(days)],
    DateDiff(Day, u.lastAccessDate, CURRENT_TIMESTAMP) as [Seen(days)],
    p.Tags as [Tags],
    p.id as [Post Link]
from Posts p, Users u, Posts a, #postids pids
where p.Id = pids.PostId
  and p.OwnerUserId = u.Id
  and p.PostTypeId = 1
  and p.ClosedDate is null
  and p.Score >= ##MinimumQuestionScore:int?2##
  and p.AnswerCount = 1
  and p.AcceptedAnswerId is null
  and p.CommunityOwnedDate is null
  and p.id = a.ParentId
  and a.Score <= ##MaximumAnswerScore:int?1##
  and (##NotAnsweredBy:int?-1## < 0 OR a.OwnerUserId != ##NotAnsweredBy:int?-1##)
  and u.UpVotes > ##MinimumUserVotes:int?5##
  and u.lastAccessDate > DateAdd(DAY, -##UserSeenDays:int?30##, CURRENT_TIMESTAMP)
order by p.Score Desc, [Age(days)] asc

Enter Parameters

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