# sales_month是字符串类型,不能直接使用'year(sales_month)'
select
    brand_id,
    sum(sales_amount) as total_sales_amount,
    sum(sales_quantity) as total_sales_quantity,
    round(avg(satisfaction_score), 2) as avg_satisfaction_score
from
    sales_data
    join customer_feedback using (sales_id)
where
    sales_month between '2023-01' and '2023-12'
group by
    brand_id
order by
    brand_id asc;