题解 | 分析各产品线在特定时间段内的销售情况

分析各产品线在特定时间段内的销售情况

https://www.nowcoder.com/practice/8a002dd7888b4247b6ac9228577bdbc3

with a as (
    select product_line, channel_id, sum(sale_amount) as total_sale_amount, count(sale_id) as total_sale_quantity
    from sales_data join oppo_products using(product_id)
    group by product_line, channel_id
)
select product_line, region, channel_name, total_sale_amount, total_sale_quantity
from a join sales_channels using(channel_id)
order by product_line, channel_id

EASY

全部评论

相关推荐

2025-12-18 22:04
已编辑
杭州电子科技大学 Java
程序员花海:技能放最后 另外这两个项目写的太简单了 没有业务没有技术栈 这种简历连HR都过不了
实习简历求拷打
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

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