SELECT t.TagName, MAX(preg.ViewCount) FROM Posts preg, Po...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow

Q&A for professional and enthusiast programmers

SELECT t.TagName, MAX(preg.ViewCount)
FROM Posts preg, PostTags pt, Tags t
WHERE preg.ParentId IS NULL
  AND ViewCount = (
      SELECT MAX(p2.ViewCount)
      FROM Posts p2
      WHERE p2.ParentId IS NULL
    )
GROUP BY t.TagName

Enter Parameters

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