折扣率=GMV/(吊牌金额*销售量)=SUM(sales_price)/SUM(sales_num*tag_price)
SELECT ROUND(SUM(sales_price)*100/SUM(sales_num*tag_price),2) 'discount_rate(%)' FROM sales_tb LEFT JOIN product_tb USING(item_id);
SELECT ROUND(SUM(sales_price)*100/SUM(sales_num*tag_price),2) 'discount_rate(%)' FROM sales_tb LEFT JOIN product_tb USING(item_id);