select b.product_line, region, channel_name, sum(sale_amount) as total_sale_amount, count(1) as total_sale_quantity from sales_data a join oppo_products b on a.product_id=b.product_id join sales_channels c on a.channel_id=c.channel_id group by b.product_line, region, channel_name, a.channel_id order by b.product_line, a.channel_id

京公网安备 11010502036488号