select
round((sum(sales_price)/sum(sales_num*tag_price))*100,2) 'discount_rate(%)'
from product_tb
left join sales_tb
on product_tb.item_id = sales_tb.item_id

select
round((sum(sales_price)/sum(sales_num*tag_price))*100,2) 'discount_rate(%)'
from product_tb
left join sales_tb
on product_tb.item_id = sales_tb.item_id