SELECT u.Id AS [User Link], SUM(CASE WHEN p.PostTypeId = ...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Korean Language

Q&A for linguists, teachers and students of the Korean language

SELECT u.Id AS [User Link],
  SUM(CASE WHEN p.PostTypeId = 2 AND p.CommunityOwnedDate IS NULL
           THEN p.Score
           ELSE 0 END) AS 'Score',
  COUNT(*) AS 'Posts',
  MAX(p.CreationDate) AS 'Last post'
  FROM Users AS u
  INNER JOIN Posts AS p
    ON u.Id = p.OwnerUserId
  INNER JOIN PostTags AS pt
    ON COALESCE(p.ParentId, p.Id) = pt.PostId
  INNER JOIN Tags AS t
    ON t.Id = pt.TagId
    AND t.TagName = '##TagName##'
  GROUP BY u.Id
  ORDER BY 2 DESC

Enter Parameters

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