Q&A for science fiction and fantasy enthusiasts
SELECT p.Id, COUNT(c.PostId) as cant_comentarios FROM Posts p LEFT JOIN Comments c ON p.Id = c.PostId GROUP BY (p.Id)