select
b.brand_id,
b.brand_name,
round(sum(return_status)/count(s.order_id),2) as return_rate_July_2024,
round(avg(customer_satisfaction_score),2) as average_customer_satisfaction_score
from brand_info b
join sales_orders s on b.brand_id=s.brand_id
join customer_feedback c on s.order_id=c.order_id
where order_date between '2024-07-01' and '2024-07-31'
group by b.brand_id,b.brand_name
order by b.brand_id;



京公网安备 11010502036488号