27,579
社区成员
发帖
与我相关
我的任务
分享
select *
, case when H>0 then H else maxValue end as I
from(
select *
, case 取值测试方式 when 'Type1' then Type1
when 'Type2' then Type2
when 'Type3' then Type3
end as H
, case when Type1>=Type2 and Type1>=Type3 then Type1
when Type2>=Type1 and Type2>=Type3 then Type2
else Type3 end as maxValue
from t
) as tt