什么逻辑都不写,我们怎么知道你要怎么变?楼主是大坑
解决方案 »
- 望高手帮忙?如果能解决该问题本人愿拿1000RMB酬谢,决不食言!!!!!!!!
- 求pl/sql developer 中一个简单的设置
- 请问如何指定Oracle的session
- 使用plsql发送邮件的问题
- 请教高难度oracle语句列转行问题.
- oracle job问多线程问题
- 存储过程包的一个存储过程,PL/SQL中能编译,测试窗口能执行,但调试时提示'通信通道的文件结束',此时没有断网,session中无执行进程,无锁表.
- 数据库varchar2字段写入问题,数组老被截断,请大家帮忙啊,很急的!!!!!
- Oracle视图中如何取出记录集中最后一条记录(急!)
- 入参与出参
- 这表,这题,sql语句要怎么写?
- oracle数据查询问题
(select -1 a, 1 b, 0 c, 100 d,'x1' e,25 f from dual union all
select -1, 1, 0, 100, 'x2', 31 from dual union all
select -1, 1, 0, 100, 'x3', 26 from dual union all
select -1, 1, 1, 200, 'x1', 14 from dual union all
select -1, 1, 1, 200, 'x2', 43 from dual union all
select -1, 1, 1, 200, 'x3', 46 from dual union all
select -1, 1, 2, 300, 'x1', 38 from dual union all
select -1, 1, 2, 300, 'x2', 29 from dual union all
select -1, 1, 2, 300, 'x3', 30 from dual)
select a,
b,
max(decode(d, 100, d)) d1,
max(decode(d, 200, d)) d2,
max(decode(d, 300, d)) d3,
e,
max(decode(d, 100, f)) f1,
max(decode(d, 200, f)) f2,
max(decode(d, 300, f)) f3
from t
group by a, b, e