SELECT TOP 100 u.Id [User Link], DATEADD(day, DATEDIFF(da...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Reverse Engineering Meta

Q&A about the site for researchers and developers who explore the principles of a system through analysis of its structure, function, and operation

SELECT TOP 100
  u.Id [User Link],
  DATEADD(day, DATEDIFF(day, 0,v.CreationDate), 0) AS TimeStamp,
    CASE
      WHEN 
        SUM(CASE 
          WHEN v.VoteTypeId = 2 THEN 10
          WHEN v.VoteTypeId = 3 THEN -2 
          ELSE NULL
          END) > 200 THEN 200 
      ELSE 
        SUM(CASE 
          WHEN v.VoteTypeId = 2 THEN 10
          WHEN v.VoteTypeId = 3 THEN -2 
          ELSE NULL
          END)
      END
    
FROM 
  Users u
JOIN Posts p ON p.OwnerUserId = u.Id
JOIN Votes v ON v.PostId = p.Id
--JOIN SuggestedEdits e ON e.OnwerUserId = u.Id
WHERE u.Id = 9190135   
GROUP BY u.id, DATEDIFF(day, 0,v.CreationDate)

Enter Parameters

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