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