Team Metova

2

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

SELECT MU.Name, 

  /* STACK OVERFLOW */
  'http://stackoverflow.com/users/' + 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],
  
  /* CODE REVIEW */
  'http://codereview.stackexchange.com/users/' + 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]
  
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
ORDER BY Name

Enter Parameters

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