Users who posted the most recent comments

1

Please login or register to vote for this query.

(click on this box to dismiss)

Physical Fitness Meta

Q&A about the site for physical fitness professionals, athletes, trainers, and those providing health-related needs

---Taking most recent comment: https://data.stackexchange.com/meta.mathoverflow/query/894707/most-recent-comments
---From them only the most recent for a user, so that users are not repeted
---Useful for example to see which users (and how many of them) actively participate on meta
;with recent_cte AS
(
SELECT
  userId AS uid,
  MAX(Id) AS MaxId
FROM Comments
WHERE (CreationDate>='##datemin?2018-01-01##')
GROUP BY UserId
)

SELECT
  uid AS [User Link], c.CreationDate, MaxId AS [Comment Link], c.PostId AS [Post Link], c.text
FROM recent_cte inner JOIN Comments c ON MaxId = c.Id
ORDER BY c.CreationDate DESC

Enter Parameters

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