Реляционный запрос

1
2
3
SELECT b.id, b.views, COUNT(c.id) as comm_count
FROM blog b LEFT JOIN blog_comments c ON (c.blog_id = b.id)
GROUP BY b.id