SELECT p.PostID, Count(c.*) FROM Post p LEFT JOIN P_comment c ON p.PostID = c.PostID GROUP BY p.PostID
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)