Perfiles Más Vistos

1

Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow en español

Preguntas y respuestas para programadores y profesionales de la informática

with VistasDeUsuarios as (
    select top ##Top:int?50##
           row_number() over(order by Views desc) [Ranking],
           Id,
           Views,
           Reputation,
           cast(cast(Views as decimal) / Reputation as decimal(10,4)) [ViewsRep],
           row_number() over(order by Reputation desc)
               - row_number() over(order by Views desc) [DifViewsToRep]
      from Users
     where Reputation >= ##MinRep:int?200##
       and Views >= ##MinViews:int?200##
     order by Views desc
)

select [Ranking],
       Id [User Link],
       Views [Vistas],
       Reputation [Reputación],
       cast( [ViewsRep] as varchar(20) ) [Vistas/Rep],
       --case when [DifViewsToRep] >= 0 then '+' else '-' end
       --    + case when abs([DifViewsToRep]) < 10 then '0' else '' end
       --    + cast(abs([DifViewsToRep]) as varchar(10)) [Dif Vistas a Rep]
       [DifViewsToRep] [Dif Vistas a Rep]
  from VistasDeUsuarios
 order by [Ranking] asc

Enter Parameters

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