ods_ticketitemproductdiscountdetail_di

SELECT
ticketitemid,
userid,
productuid,
discounttype,
case when discounttype is null or discounttype=0 then '无折扣'
when discounttype=1 then '搭赠'
when discounttype=2 then '换购'
when discounttype=3 then '打折与特价'
when discounttype=4 then '第二件打折'
when discounttype=5 then '会员折扣'
when discounttype=6 then '商品手动改价(单品折扣)'
when discounttype=7 then '套餐'
when discounttype=8 then '满额返现'
when discounttype=9 then '次卡消费'
when discounttype=10 then '会员积分兑换现金'
when discounttype=11 then '会员积分兑换商品'
when discounttype=12 then '整单折扣/整单改价、优惠券'
when discounttype=13 then '梯度优惠'
else '其他优惠' end as discounttype_name,
discountrate,
discountamount,
discounttotalamount,
discountruleuid,
pt
FROM pspldata.ods_ticketitemproductdiscountdetail_di
WHERE pt > '${start_date}' AND pt<='${end_date}'
原文地址:https://www.cnblogs.com/yjybupt/p/15044603.html