Votos de usuarios de mayor reputación

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

-- a partir de http://data.stackexchange.com/es/query/617133/top-voters

-- TOP: TOP (por reputación) "cantidad de usuarios devueltos"
-- ActivoHace: Activo hace "menos de (n|0) días"
-- RepMin: Reputación mínima
-- RepMax: Reputación máxima "0 para no limitar"
-- AnsMin: Mínima cantidad de respuestas
-- VotosMin: Mínimo de votos emitidos
-- UVMin: Mínimo de votos positivos
-- DVMin: Mínimo de votos negativos
-- VRepMin: Mínimo de V/Rep
-- VRepMax: Máximo de V/Rep "0 para no limitar"
with Votos as (
  select
         [Id] as [User Link],
         DATEDIFF(DAY, [LastAccessDate], GETDATE()) as [Seen],
         [Reputation] Rep,
         [UpVotes] [#UV],
         [DownVotes] [#DV],
         ([UpVotes] + [DownVotes]) as [#V],
         
         ROUND(((CAST([DownVotes] as float) / NULLIF(CAST(([UpVotes] + [DownVotes]) as float),0)) * 100), 2) as [%DV],
         (select COUNT(*) from posts where PostTypeId = 1 and OwnerUserId = u.Id) as [#Q],
         (select COUNT(*) from posts where PostTypeId = 2 and OwnerUserId = u.Id) as [#A],
         ROUND(((CAST([UpVotes] as float) / NULLIF(CAST([Reputation] as float),0)) * 100), 2) as [UV/Rep],
         ROUND(((CAST([DownVotes] as float) / NULLIF(CAST([Reputation] as float),0)) * 100), 2) as [DV/Rep],
         ROUND(((CAST(([UpVotes] + [DownVotes]) as float) / NULLIF(CAST([Reputation] as float),0)) * 100), 2) as [V/Rep],
         [UpVotes] * 10 - [DownVotes] * 2 as Given,
         ROUND(((CAST(([UpVotes] * 10 - [DownVotes] * 2) as float) / NULLIF(CAST([Reputation] as float),0)) * 100), 2) as [Given/Earnt]
         
           
    from Users u
    
    where [Reputation] >= ##RepMin:int?2##
      and ([Reputation] >= ##RepMax:int?0## or ##RepMax## = 0)
      and [UpVotes] + [DownVotes] >= ##VotosMin:int?0##
      and [UpVotes] >= ##UVMin:int?0##
      and [DownVotes] >= ##DVMin:int?0##
),

VotosFiltrados as (
   select top ##TOP:int?500##
          *
     from Votos
    where (##ActivoHace:int?0## = 0) or ([Seen] <= ##ActivoHace##)
      and [#A] >= ##AnsMin:int?0##
      and [V/Rep] >= ##VRepMin:int?0##
      and ([V/Rep] <= ##VRepMax:int?0## or ##VRepMax## = 0)
    order by [Rep] desc
)

select *
  from VotosFiltrados
 order by [#V] desc

Enter Parameters

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