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

某宝店铺动销率与售罄率

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

with sales_group as ( select style_id, sum(sales_price) as s, sum(sales_num) as sn from sales_tb x join product_tb y on x.item_id = y.item_id group by 1 ), pro_group as ( select style_id, sum(tag_price * inventory) as t, sum(inventory) as inv from product_tb group by 1 ) select aaa.style_id, round(100 * sn / (inv - sn), 2), round(100 * s / t, 2) from sales_group aaa join pro_group bbb on aaa.style_id = bbb.style_id group by 1

全部评论

相关推荐

10-15 15:00
潍坊学院 golang
跨考小白:这又不是官方
投递拼多多集团-PDD等公司10个岗位
点赞 评论 收藏
分享
点赞 收藏 评论
分享
牛客网
牛客企业服务