SELECT TOP 1 PostId, COUNT(*) FROM dbo.PostHistory PH JOI...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow

Q&A for programmers

SELECT TOP 1 PostId, COUNT(*)
FROM dbo.PostHistory PH
JOIN dbo.Posts P ON PH.PostId = P.Id
WHERE P.PostTypeId IN (1,2)
GROUP BY PostId
ORDER BY 2 DESC

Enter Parameters

Options:
Switch sites:
loading Hold tight while we fetch your results
:records returned in :time ms:cached