sql
来源:互联网 发布:美工培训班多少钱 编辑:程序博客网 时间:2024/05/29 07:14
select colnum, sum(decode(rnum,1, decode(c.iszy, '1', 1, 0),0)) rnum1,
sum(decode(rnum,2, decode(c.iszy, '1', 1, 0),0)) rnum2,
sum(decode(rnum,3, decode(c.iszy, '1', 1, 0),0)) rnum3,
sum(decode(rnum,4, decode(c.iszy, '1', 1, 0),0)) rnum4,
sum(decode(rnum,5, decode(c.iszy, '1', 1, 0),0)) rnum5,
sum(decode(rnum,6, decode(c.iszy, '1', 1, 0),0)) rnum6
from ldry_gj_fxsz a, ldry_gj b, ldry_gj_record c
where a.id = b.fxid(+)
and b.id = c.gjid(+)
and dqbh = '330201'
and mxbh = '1'
group by colnum
order by colnum;
sum(decode(rnum,2, decode(c.iszy, '1', 1, 0),0)) rnum2,
sum(decode(rnum,3, decode(c.iszy, '1', 1, 0),0)) rnum3,
sum(decode(rnum,4, decode(c.iszy, '1', 1, 0),0)) rnum4,
sum(decode(rnum,5, decode(c.iszy, '1', 1, 0),0)) rnum5,
sum(decode(rnum,6, decode(c.iszy, '1', 1, 0),0)) rnum6
from ldry_gj_fxsz a, ldry_gj b, ldry_gj_record c
where a.id = b.fxid(+)
and b.id = c.gjid(+)
and dqbh = '330201'
and mxbh = '1'
group by colnum
order by colnum;
阅读全文
0 0
- SQL
- SQL
- SQL
- sql
- sql
- SQL
- sql
- SQL (-)
- sql
- SQL
- SQL
- SQL
- sql
- sql
- sql
- sql
- SQL
- sql
- Syntax error on token "catch", Identifier expected
- 【Python那些事儿】使用箱线图
- IBatis-学习-1
- c#FileStream文件读写.以及filestream,file和FileInfo的区别
- Android Activity启动模式学习
- sql
- 怎么让Windows2012和Windows2008多用户同时远程
- bzoj 3456 城市规划
- maven发布snapshot到nexus失败解决方案
- Spring Boot idel 实现热部署
- 500错误,解决mapper映射文件不拷贝的问题
- android自定义ViewGroup实战篇 -> 实现FlowLayout
- js实现input输入框只能输入数字的功能(完美测试通过)
- 加急审核流程