with t as ( select a.item_id,a.style_id,a.tag_price,a.inventory, total_sales, GMV from product_tb a join ( select sum(sales_num) as total_sales, item_id,sum(sales_price) as GMV from sales_tb group by item_id ) b using(item_id) ) select style_id, round( sum(total_sales)/sum(inventory-total_sales)*100...