Percentage of the total rep of users with "monica" substring

1

Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow на русском Meta

Вопросы и ответы о сайте для программистов

WITH Monica AS (
  SELECT SUM(Reputation) AS Monica
  FROM Users
  WHERE LOWER(DisplayName) LIKE '%monica%'
),
SumRep AS (
  SELECT SUM(Reputation) AS SumRep
  FROM Users
)
SELECT Monica.Monica, SumRep.SumRep, 100.0 * Monica.Monica / SumRep.SumRep AS Pct
FROM Monica, SumRep;

Enter Parameters

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