▲求按金额分类计费的SQL▲ select sum(decode(sign(amount-10000),-1,5,decode(sign(amount-50000),-1,amount*0.0003,decode(sign(amount-100000),-1,amount*0.0002,20)))) from tbname; 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 select (case when amount<10000 then 5 when amount<50000 and amount>10000 then amount*0.03/100 when amount<100000 and amount>50000 then amount*0.02/100 else 20 end) feefrom table 这个问题你知道的--进来看看 我需要建一存贮过程,动态遍历树结构表,不能用ORACLE提供的函数。 oracle 11g OEM无法启动 存储过程 根据一个表对另一个表进行更新 oracle 游标错误处理 sql语句中的字段区分大小写么? 循环问题 用Oracle的创建数据库步骤 如何在oracle8.17中加入Java程序 sql查询 System.Exception: ORA-06550: 如何解决 真的很急, help! 想深入了解关于数据块
when amount<50000 and amount>10000 then amount*0.03/100
when amount<100000 and amount>50000 then amount*0.02/100
else 20
end) fee
from table