i have two tables
comments
------------------
id text
rates
---------------------
id comment_id score
My query is … but sum operation not affected. just one row will be returen.
SELECT *, SUM(rates.score) FROM comment LEFT JOIN rate ON (rate.comment_id = comment.id)
1 Answer