SELECT p.Id, COUNT(c.PostId) as cant_comentarios FROM Pos...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Science Fiction and Fantasy

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)

Enter Parameters

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