WITH q AS ( SELECT MAX(PostId) as PostId, COUNT(*) as Co...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Sports

Q&A for participants in team and individual sport activities

-- Enter Query Title
-- Enter Query Description

WITH q AS (
SELECT MAX(PostId) as PostId, COUNT(*) as CountRevisions, COUNT(DISTINCT UserId) AS CountUsers FROM PostHistory
WHERE PostHistoryTypeId=5
GROUP BY PostId
)

SELECT TOP 20 *
FROM q
ORDER BY NEWID()

Enter Parameters

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