互联网电商大数据环境 ——大数飓数据分析实践培训精华笔记(九)——电商核心业务知识之订单商品模块

这篇博客聚焦于互联网电商大数据环境中的订单商品模块,深入探讨了大数飓数据分析实践培训中的精华内容,主要关注商品信息汇总表的解析和应用。
摘要由CSDN通过智能技术生成

商品信息汇总表


select 
user_id, 
sum(case
when pay_type not in (‘退货’,’拒收’) then
     goods_amount
end)  p_sales_cnt,-排除退拒销售数量
sum(case
when pay_type not in (‘退货’,’拒收’) then
     goods_price * goods_amount
end)  p_sales_amt,-排除退拒销售金额
sum(case
when pay_type not in (‘退货’,’拒收’) then
     (goods_price – ‘优惠价’) * goods_amount
end)  p_sales_cnt_amt,-排除退拒销售金额(扣促销减免)
sum(goods_amount) h_sales_cnt, -含退拒销售数量
sum(goods_price * goods_amount) h_sales_amt, -含退拒销售金额
sum((goods_price – ‘优惠价’) * goods_amount) h_sales_cut_amt, -含退拒销售金额(扣促销减免)
sum(case
when pay_type in (‘退货’) then
     goods_amount
end) return_cnt,-退货商品数量
sum(case
when pay_type in (‘退货’) then
     goods_price * goods_amount
end) return_amt,-退货商品金额
sum(case
when pay_
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值