题解 | 评估2023年不同品牌商品的销售趋势和客户满意度

评估2023年不同品牌商品的销售趋势和客户满意度

https://www.nowcoder.com/practice/a32c7ff803054a919e2b65334463002f

# 各个品牌在2023年的总销售额、总销售数量、平均客户满意度评分

with
t1 as(
    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
        customer_feedback left join sales_data using(sales_id)
    where
        sales_month between '2023-01' and '2023-12'
    group by
        brand_id
    order by
        brand_id
)

select * from t1

全部评论

相关推荐

03-03 19:02
已编辑
东华理工大学 Node.js
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务