题解 | 分析各产品线在特定时间段内的销售情况
分析各产品线在特定时间段内的销售情况
https://www.nowcoder.com/practice/8a002dd7888b4247b6ac9228577bdbc3
select
op.product_line,
sc.region,
sc.channel_name,
sum(sale_amount) as total_sale_amount,
count(*) as total_sale_quantity
from
sales_data sd join oppo_products op on sd.product_id = op.product_id
join sales_channels sc on sd.channel_id = sc.channel_id
group by
op.product_line, sc.channel_id, sc.region, sc.channel_name
order by
op.product_line, sd.channel_id;
查看18道真题和解析