SELECT TOP 5 temp.totalcomments,NewsLetter.title,NewsLetter.nID
FROM
(SELECT NewsLetter.nID,NewsLetter.title ,COUNT(a.nID) AS TotalComments
FROM NewsLetter LEFT OUTER JOIN (select nID from Comments where approved='true') as a
ON a.nID=NewsLetter.nID
GROUP BY NewsLetter.nID,NewsLetter.title) AS temp,Newsletter
WHERE scID=10 AND temp.nID=NewsLetter.nID AND trash='false'
ORDER BY totalcomments DESC;
67f61b6b-34dd-4666-b391-c9151214bc4f|0|.0|96d5b379-7e1d-4dac-a6ba-1e50db561b04
SQL
Query for getting the childtable no of rows related to one single row in parent table