voting/downvoting quote for user list, derrived query

0

Please login or register to vote for this query.

(click on this box to dismiss)

Lifehacks

Q&A for people looking to bypass life's everyday problems with simple tricks

select top 100000
row_number() over (order by u.DownVotes * 1.0 / (u.UpVotes + 1) desc) as '#',
  u.Id as [User Link],
  format(u.DownVotes * 1.0 / (UpVotes + DownVotes), 'p') as [Evil Ratio],
  u.UpVotes as [Up],
  u.DownVotes as [Down],
  u.UpVotes + u.DownVotes as [Total],
  u.Reputation as [Rep],
  u.LastAccessDate as [Last Access],
  (
    select top 4
      t.TagName + ', ' as 'data()'
    from
      Posts as q
    inner join
      Posts as a on a.ParentId = q.Id
    inner join
      PostTags as pt on pt.PostId = q.Id
    inner join
      Tags as t on pt.TagId = t.Id
    where
      a.OwnerUserId = u.Id and a.PostTypeId = 2
    group by
      TagName
    order by
      sum(a.Score) desc
    for xml path('')
  ) + ' ...' as [Top Tags]
from
  Users as u
where
  u.DownVotes > 1 AND u.UpVotes >= 0
  and u.Id <> -1 AND u.Reputation > 85 AND u.Reputation < 110
order by
u.DownVotes * 1.0 / (UpVotes + DownVotes) desc

Enter Parameters

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