select b.brand_id
,brand_name
,round(sum(return_status)/count(return_status),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 substring(order_date,1,4) = "2024"
and substring(order_date,6,2) = "07"
group by b.brand_id
,brand_name
order by brand_id