题解 | #某宝店铺动销率与售罄率#

某宝店铺动销率与售罄率

http://www.nowcoder.com/practice/715dd44c994f45cb871afa98f1b77538

with a as(
select item_id,sum(sales_num) s1,sum(sales_price) s2
from sales_tb
group by item_id)
select style_id,round(sum(s1)/sum(inventory-s1)*100,2) as 'pin_rate(%)',
round(sum(s2)/sum(tag_price*(inventory))*100,2) as 'sale-through_rate(%)'
from product_tb pt left join a on pt.item_id=a.item_id
group by style_id
order by style_id
全部评论

相关推荐

评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务