题解 | #某宝店铺折扣率#

某宝店铺折扣率

https://www.nowcoder.com/practice/3a56f160308441f5a79d8ac8d953e5e7


# 3.20 11:42 —— 
# 字段:折扣率 (GMV / 吊牌金额)

with tb1 as(
    select item_id, sales_price, tag_price*sales_num as avg_price,tag_price
    from sales_tb left join product_tb using(item_id)
)

select round(round(sum(sales_price)/sum(avg_price),4)*100,2)
from tb1

# 此处用了总GMV / 总标价

全部评论

相关推荐

高斯林的信徒:武大简历挂?我勒个骚岗
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客企业服务