I have 3 tables in the database:
product_id | product_title
tbl_reviews - products reviews:
review_id | product_id
tbl_rates - each review has its own rates (like durability, design, features etc.):
rate_id | review_id | stars
I want to make a query that brings the average rates for each product.
The problem is that each product can have more than 1 review…so when I’m
using with() all I get is an array of reviews (but what I need is the average of ALL reviews rates).
How can I do this?