SELECT TOP 1 p.id, COUNT(c.id) AS post_count FROM comment...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Sitecore Meta

Q&A about the site for developers and end users of the Sitecore CMS and multichannel marketing software

SELECT TOP 1 p.id, COUNT(c.id) AS post_count
FROM comments c JOIN posts p ON p.id=c.postid
GROUP BY p.id
ORDER BY COUNT(c.id) DESC

Enter Parameters

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