求语句 有这么一个库我想 根据serialcode 把它对应的不同的classnumber (3和1)所对应的 branchquantity的值求倍数(classnumber=1的 branchquantity值 除以classnumber=3的 branchquantity值 ) 然后把倍数存到一个临时量中 该怎么做? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 select serialcode,s1/s3 from (select serialcode, classnumber, branchquantity from t where t.classnumber in (1,3)) pivot(sum(branchquantity) for classnumber in(1 s1,3 s3)) where s1 is not null and s3 is not null; oracle 时差转换问题。。 oracle81安装错误。 如何查询oracle某个用户下面的包名列表 PL/SQL和Java开发Oracle8i应用程序 为什么我的存储过程总有编译错误? 一个简单的SQL,快来抢分啊 log_buffer参数问题 关于group by语句 请问oracle存储过程名称放在哪个系统表中呀? 如果筛选数据库中不重复的记录 关于Oracle 10g的Oracle HTTP Server 在线等 一条SQL语句转成Linq语句
select serialcode,s1/s3
from (select serialcode, classnumber, branchquantity from t where t.classnumber in (1,3))
pivot(sum(branchquantity) for classnumber in(1 s1,3 s3))
where s1 is not null
and s3 is not null;