I have a table with products and a table with ratings. I have the following query;
SELECT products.name, ratings.rating
FROM products
LEFT OUTER JOIN ratings
ON products.id = ratings.product_id;
Returning me a nice list of rows with the name of the product and every rating separately.
I am trying to achieve that it returns one row showing me the name of the product with its average rating. Can't seem to find out how though.
Thanks in advance.