(SELECT group_concat(referral_amount) from ag_acl_customer_fortune where order_id=f.order_id and drop_option_code ='C06' and practitioner_id = l.mentor_id),
'') '27' /*续期辅导奖*/,
sum(case when drop_option_code ='C04' then f.calculation_rate else '' end) '28' /*'经纪人月销售加码奖金%'*/,
sum(case when drop_option_code ='C04' then f.referral_amount else '' end) '29' /*经纪人月销售加码奖金*/,
sum(case when drop_option_code ='C04' then f.calculation_rate else null end) '28' /*'经纪人月销售加码奖金%'*/,
sum(case when drop_option_code ='C04' then f.referral_amount else null end) '29' /*经纪人月销售加码奖金*/,
l.introducer_id '30' /*推荐人*/,
(SELECT group_concat(calculation_rate) from ag_acl_customer_fortune where order_id=f.order_id and drop_option_code ='C05' and practitioner_id = l.introducer_id) '31' /*个人推荐率*/,
(SELECT group_concat(referral_amount) from ag_acl_customer_fortune where order_id=f.order_id and drop_option_code ='C05' and practitioner_id = l.introducer_id) '32' /*个人推荐奖¥*/,
sum(case when drop_option_code ='C15' then f.calculation_rate else '' end) '33' /*体系推荐率*/,
sum(case when drop_option_code ='C15' then f.referral_amount else '' end) '34' /*体系推荐奖金¥*/,
sum(case when drop_option_code ='C15' then f.calculation_rate else null end) '33' /*体系推荐率*/,
sum(case when drop_option_code ='C15' then f.referral_amount else null end) '34' /*体系推荐奖金¥*/,
l.mentor_id '35' /*一代辅导人*/,
l.mentor_level '36' /*一代辅导人职级*/,
...
...
@@ -506,12 +506,12 @@
(SELECT group_concat(calculation_rate) from ag_acl_customer_fortune where drop_option_code ='C09' and order_id=f.order_id and practitioner_id = l.raise_id) '62' /*育成奖金率*/,
(SELECT group_concat(referral_amount) from ag_acl_customer_fortune where drop_option_code ='C09' and order_id=f.order_id and practitioner_id = l.raise_id) '63' /*育成金额*/,
sum(case when drop_option_code ='C14' then f.calculation_rate else '' end) '64' /*C14直接销售加码佣金率*/,
sum(case when drop_option_code ='C14' then f.referral_amount else '' end) '65' /*C14直接销售加码佣金*/,
sum(case when drop_option_code ='C14' then f.calculation_rate else null end) '64' /*C14直接销售加码佣金率*/,
sum(case when drop_option_code ='C14' then f.referral_amount else null end) '65' /*C14直接销售加码佣金*/,