SAV-2b ranking

1

Please login or register to vote for this query.

(click on this box to dismiss)

Physics

Q&A for active researchers, academics and students of physics

select top ##NumResults?30000## rank() over (order by R.SAVScore desc) as Rank, R.Id as [User Link]
    , R.SAVScore, R.mSVRatio, R.ScoreRatio, R.TotalScore, R.NumAnswers
from (
  select U.Id
    , sum(A.Score) as TotalScore
    , count(A.Id) as NumAnswers
    , sum(1000 * cast(A.Score as float(53)) / Q.ViewCount) / count(A.Id) as mSVRatio
    , cast(sum(A.Score) as real) / count(A.Id) as ScoreRatio
    , sum((1 - 1/((cast(A.Score as float(53))*(##b?99##*cast(A.Score as float(53))/Q.ViewCount + 1)/##a?80##) + 1)))
      / count(A.Id) as SAVScore
  from Posts A
  inner join (
    select P.Id, max(P.ViewCount) as ViewCount
    from Posts P
    inner join PostTags PT on PT.PostId = P.Id
    inner join Tags T on T.Id = PT.TagId
    where ('##TagName?^_^##' = '^_^' or T.TagName = '##TagName?^_^##')
      and P.CreationDate >= dateadd(year, -(1+##MaxYearsElapsed?100##), getdate())
    group by P.Id
    ) Q on Q.Id = A.ParentId
  inner join Users U on U.Id = A.OwnerUserId
  where A.PostTypeId = 2
    and A.CommunityOwnedDate is null -- Excluding CW answers.
    and A.Score > -##a?80## -- Preventing division by zero.
    -- and Q.CreationDate >= dateadd(year, -(1+##MaxYearsElapsed?100##), getdate())
  group by U.Id, U.Reputation
  having count(A.Id) >= ##MinAnswerCount?100##
  ) R
where R.ScoreRatio >= ##MinimumScoreRatio?0##
order by R.SAVScore desc

-- sav = 1 - 1 / ((score/a) * (score/views + 1) + 1)
-- For an uncapped number of results, MinAnswerCount = 150 works for now.
-- Use TagName = '^_^' to disable the tag filter.
-- When filtering by tag, 10 and 50 might be reasonable defaults for MinAnswerCount.
-- The division by zero hack is questionable, but it doesn't really matter as long as there arent live -80 answers around.

Enter Parameters

Options:
Switch sites:
loading Hold tight while we fetch your results