多个if查询及case when 语句

2024-10-09 09:54:47 浏览数 (1)

concat( if(t2.`flow_flag`=1 and t1.`field_source`= '06','支付宝账号1',''), if(t2.`flow_flag`=0 and t1.`field_source`= '06','支付宝账号2',''), if(t2.`flow_flag`=1 and t1.`field_source`= '07','微信账号1',''), if(t2.`flow_flag`=0 and t1.`field_source`= '07','微信账号2','')) as '账号',

case `field_source` when 1 then '支付宝' when 2 then '微信' end as '支付来源',

0 人点赞