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

某宝店铺动销率与售罄率

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

with t1 as(
select item_id,sum(sales_num) as cnt,
sum(sales_price) as price
from sales_tb group by item_id order by item_id),

t2 as(
select style_id,
round(100*sum(cnt)/sum(inventory-cnt),2) as 'pin_rate(%)',
round(100*sum(price)/sum((inventory)*tag_price),2) AS
'sell-through_rate(%)'
from product_tb pro join t1 on pro.item_id=t1.item_id group by style_id)

select * from t2 order by style_id

全部评论

相关推荐

2025-12-17 17:15
华东师范大学 运营
点赞 评论 收藏
分享
2025-11-27 14:21
同济大学 Java
卢来猴祖:给了这薪资关键拿不了几个月就给你踹了呀
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

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