Most disliked users of the site

1

Please login or register to vote for this query.

(click on this box to dismiss)

Christianity

Q&A for committed Christians, experts in Christianity and those interested in learning more

SELECT TOP 10000
  DENSE_RANK() OVER (ORDER BY
    ##DownWeight:float?1## * DownRank +
    ##RatioWeight:float?1## * RatioRank +
    ##ReputationWeight:float?1## * RepRank) AS Rank,
  UserId AS [User Link],
  Downs,
  DownRank,
  Reputation,
  Ratio,
  RatioRank,
  RepRank
FROM (
  SELECT
    UserId,
    Downs,
    DownRank,
    Reputation,
    Ratio,
    DENSE_RANK() OVER (ORDER BY Ratio DESC) AS RatioRank,
    RepRank
  FROM (
    SELECT
      RankedDowns.UserId, RankedDowns.Downs, RankedDowns.DownRank,
      RepRank.Reputation, RepRank.RepRank,
      1.0 * Downs / Reputation AS Ratio
    FROM (
      SELECT
        UserId,
        Downs,
        DENSE_RANK() OVER (ORDER BY Downs DESC) AS DownRank
      FROM (
        SELECT Posts.OwnerUserId AS UserId, COUNT(*) AS Downs
        FROM Votes, Posts
        WHERE
          Votes.PostId = Posts.Id
          AND
          Votes.VoteTypeId = 3
        GROUP BY Posts.OwnerUserId
      ) AS Downs
    ) AS RankedDowns,
    (
      SELECT
        Id AS UserId,
        Reputation,
        DENSE_RANK() OVER (ORDER BY Reputation DESC) AS RepRank
      FROM Users
    ) AS RepRank
    WHERE
      RankedDowns.UserId = RepRank.UserId
  ) Raw
) Raw2
ORDER BY Rank, UserId

Enter Parameters

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