SAVL exponent 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?50000## rank() over (order by R.SAVScore desc) as Rank, R.Id as [User Link]
    , R.SAVScore, R.mSVRatio
    , rank() over (order by R.TotalScore desc) as ScoreRank
    , R.ScoreRatio, R.TotalScore, R.NumAnswers
    , U2.DisplayName
from (
  select U.Id
    , sum(A.Score) as TotalScore
    , count(A.Id) as NumAnswers
    , 1000*avg(cast(A.Score as float(53)) / Q.ViewCount) as mSVRatio
    , avg(cast(A.Score as float(53))) as ScoreRatio
    , sum((cast(1 as float(53))/##a?80##)*A.Score*(1 + ##b?49##*cast(A.Score as float(53))/Q.ViewCount)) as SAVScore
  from Posts A
    --  alternatively, a=25.7231
  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 Q.CreationDate >= dateadd(year, -(1+##MaxYearsElapsed?100##), getdate())
  group by U.Id
  having count(A.Id) >= ##MinAnswerCount?80##
  ) R
  cross apply (
    select top 1 U2.DisplayName
    from Users U2
    where U2.Id = R.Id
    ) as U2
where R.ScoreRatio >= ##MinimumScoreRatio?-100##
order by R.SAVScore desc

-- savl = 2/(1+exp(-(1/a)*score*(1+b*score/views))) - 1
-- Use TagName = '^_^' to disable the tag filter.

Enter Parameters

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