select
product_line,
region,
channel_name,
sum(sale_amount) as total_sale_amount,
count(*) as total_sale_quantity
from oppo_products p
join sales_data s1 using(product_id)
join sales_channels s2 using(channel_id)
group by 1,2,3,channel_id
order by product_line,channel_id



京公网安备 11010502036488号