Linky Leaderboard

0

Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow

Q&A for professional and enthusiast programmers

SELECT
  ROW_NUMBER() OVER (ORDER BY z.[Average Linkyness] DESC),
  z.*
FROM (
  SELECT
    OwnerUserId AS [User Link],
    AVG(
      CAST((len(A.Body) - len(replace(A.Body, 'scifi.stackexchange.com', ''))) AS float)
        /CAST(len('scifi.stackexchange.com') AS float)
        ) AS [Average Linkyness]
  FROM Posts A
  WHERE
     A.PostTypeId = 2
     group by OwnerUserId
) AS z

Enter Parameters

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