|
@@ -23,10 +23,13 @@
|
|
|
count(oid) as 'orderNum',
|
|
|
sum(case when order_status != 80 then 1 else 0 end) as 'validOrderNUm',
|
|
|
round(sum(case when order_status != 80 then 1 else 0 end) / count(oid),4) as 'validRadio',
|
|
|
+ sum(pay_amount) as 'payAmount',
|
|
|
+ sum(case when order_status != 80 then pay_amount else 0 end) as 'validPayAmount',
|
|
|
sum(case when send_status = 1 and order_status != 80 then 1 else 0 end) as 'deliveryNum',
|
|
|
sum(case when send_status = 0 and order_status != 80 then 1 else 0 end) as 'notDeliveryNum',
|
|
|
round(sum(case when send_status = 1 and order_status != 80 then 1 else 0 end) / sum(case when order_status != 80
|
|
|
- then 1 else 0 end),4) as 'deliveryRadio'
|
|
|
+ then 1 else 0 end),4) as 'deliveryRadio',
|
|
|
+ sum(case when order_status != 80 then regimental_promotion_amount else 0 end) as 'regimentalPromotionAmount'
|
|
|
from kuaishou_supply_chain
|
|
|
where 1= 1
|
|
|
<if test="start != null and start != ''">
|
|
@@ -510,7 +513,10 @@
|
|
|
sum(case when send_status = 1 and order_status != 80 then 1 else 0 end) as 'deliveryNum',
|
|
|
sum(case when send_status = 0 and order_status != 80 then 1 else 0 end) as 'notDeliveryNum',
|
|
|
round(sum(case when send_status = 1 and order_status != 80 then 1 else 0 end) / sum(case when order_status != 80
|
|
|
- then 1 else 0 end) * 100,2) as 'deliveryRadio'
|
|
|
+ then 1 else 0 end) * 100,2) as 'deliveryRadio',
|
|
|
+ round(sum(pay_amount) / 100,2) as 'payAmount',
|
|
|
+ round(sum(case when order_status != 80 then pay_amount else 0 end) / 100 , 2 ) as 'validPayAmount',
|
|
|
+ round(sum(case when order_status != 80 then regimental_promotion_amount else 0 end) / 100, 2) as 'regimentalPromotionAmount'
|
|
|
from kuaishou_supply_chain
|
|
|
where 1= 1
|
|
|
<if test="start != null and start != ''">
|