Team Metova


Please login or register to vote for this query.

(click on this box to dismiss)

Ask Ubuntu

Q&A for Ubuntu users and developers

CREATE TABLE #MetovaUsers (Name nvarchar(100), StackOverflowUserId int)

INSERT INTO #MetovaUsers (Name, StackOverflowUserId)
SELECT 'Nick Griffith', 2792531
UNION SELECT 'Andrew Neal', 420015
UNION SELECT 'Jason Robinson', 291827
UNION SELECT 'Nick Sinas', 78550
UNION SELECT 'Logan Gauthier', 4431666
UNION SELECT 'Zachary Hensley', 3987923
UNION SELECT 'Ron Unger', 178758
UNION SELECT 'Levi Hobbs', 2539607
UNION SELECT 'Logan Serman', 29595
UNION SELECT 'Chris Johnson', 720083
UNION SELECT 'Not Dave Lane', 672380
UNION SELECT 'Riley Mills', 634997 


  '' + CAST(SOU.Id as nvarchar) + '|' + SOU.DisplayName AS SOUserName, 
  SOU.Reputation AS StackOverflowRep,
  SOU.CreationDate AS SOJoinDate,
  SOU.Reputation / DATEDIFF(WEEK,SOU.CreationDate,GETDATE()) AS [SO Rep/Week Average],
  '' + CAST(CRU.Id as nvarchar) + '|' + CRU.DisplayName AS CRUserName, 
  CRU.Reputation AS CodeReviewRep,
  CRU.CreationDate AS CRJoinDate,
  CRU.Reputation / DATEDIFF(WEEK,CRU.CreationDate,GETDATE()) AS [CR Rep/Week Average],
  '' + CAST(PU.Id as nvarchar) + '|' + PU.DisplayName AS ProgrammersUserName,
  PU.Reputation AS ProgrammersRep,
  PU.CreationDate AS ProgrammersJoinDate,
  PU.Reputation / DATEDIFF(WEEK,PU.CreationDate,GETDATE()) AS [Programmers Rep/Week Average]
FROM #MetovaUsers MU
  INNER JOIN StackOverflow.dbo.Users SOU ON SOU.Id = MU.StackOverflowUserId
  LEFT OUTER JOIN [StackExchange.CodeReview].dbo.Users CRU ON CRU.AccountId = SOU.AccountId
  LEFT OUTER JOIN [StackExchange.Programmers].dbo.Users PU ON PU.AccountID = SOU.AccountId
ORDER BY ISNULL(SOU.Reputation,0)+ISNULL(CRU.Reputation,0)+ISNULL(PU.Reputation,0) DESC

Enter Parameters

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