union 横向组合
select sum(zs) zs,sum(zl) zl,sum(ts) ts,sum(lxcbw) lxcbw,sum(bz) bz,sum(sfzqt) sfzqt
from (
select count(distinct sqh) zs,0 zl,0 ts,0 lxcbw,0 bz,0 sfzqt from **** where pici = '673' and chuandate = '20190701'
union all
select 0 zs,count( sqh) zl,0 ts,0 lxcbw,0 bz,0 sfzqt from ***** where sqh in(
select sqh from ywbl_scyyw_chuan where pici = '673' and chuandate = '20190701')
union all
select 0 zs,0 zl,count( sqh) ts,0 lxcbw,0 bz,0 sfzqt from **** where sqh in(
select sqh from ywbl_scyyw_chuan where pici = '673' and chuandate = '20190701')
union all
select 0 zs,0 zl,0 ts,count( sqh) lxcbw,0 bz,0 sfzqt from ***** where sqh in(
select sqh from ywbl_scyyw_chuan where pici = '673' and chuandate = '20190701')
union all
select 0 zs,0 zl,0 ts,0 lxcbw ,count( sqh) bz,0 sfzqt from ***** where sqh in(
select sqh from ywbl_scyyw_chuan where pici = '673' and chuandate = '20190701')
union all
select 0 zs,0 zl,0 ts,0 lxcbw,0 bz,count( sqh) sfzqt from **** where sqh in(
select sqh from ywbl_scyyw_chuan where pici = '673' and chuandate = '20190701')
)
最新文章
- JS 工厂模式
- 图解集合1:ArrayList
- getopt解析命令行参数一例:汇集多个服务器的日志
- 人生导师——如何学习C++的Windows方向
- Maven,预加载资源文件
- java 解析XML文档
- Cookie和Session简介与区别
- Java I/O第二篇 之 (缓冲流 随机流 数组流 数据流)
- 14周事情总结-机器人-大数据hadoop
- 织梦内容管理系统(DedeCms) 小说模块insert注入漏洞
- hdu 2189
- Hadoop MultipleOutputs 结果输出到多个文件夹 出现数据不全,部分文件为空
- JS Tree
- 微信开发(2)–获取access_token
- 论文笔记(2):A fast learning algorithm for deep belief nets.
- Windows -- 使用批处理文件.bat删除旧文件
- Linux内核入门到放弃-模块-《深入Linux内核架构》笔记
- [Day21]异常
- easyui之自定义字体图标(鼠标覆盖时切换颜色)
- 初识TypeScript
热门文章
- 支持向量机(四)----序列最小最优化算法SMO
- 小程序封装wx.request,以及调用
- 利用python进行数据分析--numpy基础
- ES6 模板语法和分隔符
- (转)Jquery之ShowLoading遮罩组件
- 图书-软件架构:《Design Patterns: Elements of Reusable Object-Oriented Software》(即后述《设计模式》一书)
- 009-Spring Boot 事件监听、监听器配置与方式、spring、Spring boot内置事件
- 博客中gitalk最新评论的获取 github api使用
- JDK+Tomcat+Eclipse环境搭建过程记录
- GUI_FlowLayout