SELECT
s.brand_id,
SUM(s.sales_amount) AS total_sales_amount,
SUM(s.sales_quantity) AS total_sales_quantity,
ROUND(AVG(c.satisfaction_score),2) AS avg_satisfaction_score
FROM
sales_data AS s
INNER JOIN
customer_feedback AS c ON s.sales_id=c.sales_id
WHERE
SUBSTRING_INDEX(s.sales_month,'-',1)='2023'
GROUP BY
s.brand_id

京公网安备 11010502036488号