CAD库中统计PBN运行航路条数和总距离
select 'PBN运行航路' 类型, fb.b 总条数, fa.a 总距离 from
(
select sum(s) a from (
select distinct f4.airway_point1,f4.airway_point2, f4.kilometer_distance S from airway f1, airway_segment_point f2,airway_segment_point f3, segment f4
where
f1.chart_type_id=3 and
f1.airway_id =f2.airway_id and
f1.airway_id =f3.airway_id and
f2.airway_seq=f3.airway_seq-1 and
(
(f2.airway_point_id =f4.airway_point1 and f3.airway_point_id =f4.airway_point2) or
(f2.airway_point_id =f4.airway_point2 and f3.airway_point_id =f4.airway_point1)
) and f1.airway_rnp is not null
) tm
) fa
left join
(select count(*) b from airway where airway_rnp is not null and chart_type_id=3 ) fb
on 1=1
纯PBN代号航路
select 'PBN代号航路' 类型, fb.b 总条数, fa.a 总距离 from
(
select sum(s) a from (
select distinct f4.airway_point1,f4.airway_point2, f4.kilometer_distance S from airway f1, airway_segment_point f2,airway_segment_point f3, segment f4
where
f1.chart_type_id=3 and
f1.airway_id =f2.airway_id and
f1.airway_id =f3.airway_id and
f2.airway_seq=f3.airway_seq-1 and
(
(f2.airway_point_id =f4.airway_point1 and f3.airway_point_id =f4.airway_point2) or
(f2.airway_point_id =f4.airway_point2 and f3.airway_point_id =f4.airway_point1)
) and f1.airway_type_id in (2,5,8)
) tm
) fa
left join
(select count(*) b from airway where airway_type_id in (2,5,8) and chart_type_id=3 ) fb
on 1=1
CAD库中统计PBN运行航路条数和总距离的更多相关文章
- (转)如何在Linux中统计一个进程的线程数
如何在Linux中统计一个进程的线程数 原文:http://os.51cto.com/art/201509/491728.htm 我正在运行一个程序,它在运行时会派生出多个线程.我想知道程序在运行时会 ...
- SQLSERVER中统计所有表的记录数
SQLSERVER中统计所有表的记录数 利用系统索引表sysindexes中索引ID indid<1的行中的rows列存有该表的行数这一特点. 方法是利用隐藏未公开的系统存储过程sp_MS ...
- PHP查询数据库中满足条件的记录条数(二种实现方法)
在需要输出网站用户注册数或者插入数据之前判断是否有重复记录时,就需要获取满足条件的MySQL查询的记录数目,接下来介绍两种查询统计方法,感兴趣的朋友可以了解下啊,或许对你有所帮助 在需要输出网 ...
- 2015.7.24 CAD库中列举五字代码点所属航路及终端区图,左连接的累加
select decode(fb.tupr,null,'仅航路',decode(fc.aw,null,'仅终端区','航路及终端区')) 范围,pt 五字代码点,fb.tupr 终端区图及程序,fc. ...
- CAD库中列举所有航路点
select distinct f1.airway_point_name,f1.latitude,f1.longitude,upper(f1.airway_point_type_name)type,f ...
- jmeter中一次运行多条sql语句
操作比较简单,主要就分两步: 第一步:在JDBC Connection Configuration中设置,主要见下图标注部分增加:?allowMultiQueries=true 第二步:在JDBC R ...
- MySQL数据库中统计一个库中的所有表的行数?
今天公司两个远端的数据库主从同步有点问题,查看下wordpress库下所有表的表的条目? mysql> use information_schema;Database changedmysql& ...
- 查询cad库中,所有程序leg引用的点的id,需要预先处理点表和程序表
select f1.pro_id,f1.pro_type, f1.code_fix_point, f1.code_type_fix_point, f1.code_fir,f2.code_icao,nv ...
- 如何在 Linux 中统计一个进程的线程数
编译自:http://ask.xmodulo.com/number-of-threads-process-linux.html作者: Dan Nanni原创:LCTT https://linux.cn ...
随机推荐
- js数组排序sort()方法
一.sort方法升序: <script> var arr=[1,15,10,3,56]; arr.sort(function(num1,num2){ return num1-num2; } ...
- .html() .text() .val() 的区别
.html()用为读取和修改元素的HTML标签(包括其Html标签) .text()用来读取或修改元素的纯文本内容 (包括其后代元素) .val()用来读取或修改表单元素的value值.(只能用于表单 ...
- Swagger实践和总结
Swagger学习和实践 最近安装并使用了一下Swagger-ui.Swagger-editor和Swagger-codegen,感觉还不错. Swagger 是一个规范和完整的框架,用于生成.描述. ...
- C3P0使用详解
定义: C3P0是一个开源的JDBC连接池,目前使用它的开源项目有Hibernate,Spring等. 数据库连接池的基本思想就是为数据库连接建立一个"缓冲池".预先在缓冲池中放入 ...
- mybatis分页插件使用注意
之前的项目用的数据库是mysql,在pom.xml引入这一个就能分页了. 后来又开了一个项目,使用的是oracle数据库,我写分页的时候发现不能实现,在网上找到资料说是必须要5.0以上的.我就导了这依 ...
- linux命令三
作业一:1) 将用户信息数据库文件和组信息数据库文件纵向合并为一个文件/1.txt(覆盖) [root@bogon test]# cat /etc/passwd /etc/group > /1. ...
- Git和SVN之间的区别
如果你在读这篇文章,说明你跟大多数开发者一样对GIT感兴趣,如果你还没有机会来试一试GIT,我想现在你就要了解它了. GIT不仅仅是个版本控制系统,它也是个内容管理系统(CMS),工作管理系统等.如果 ...
- 网络之Call Phone、Web、SMS、Email
1. 准备工作:导入信息UI库 #import <MessageUI/MessageUI.h>2. Call Phone 方式一: 拼接字符串 注意开头是tel: 这种方式打电话回不到原来 ...
- 使用flowable 6.1.2 REST API 运行请假审批流程
一.下载 flowable rest war 包 http://download.csdn.net/detail/teamlet/9913312 二.部署 复制flowable REST.war到To ...
- 官方:MySQL 5.7 并行复制实现原理与调优 | InsideMySQL(转载)
MySQL 5.7并行复制时代 众所周知,MySQL的复制延迟是一直被诟病的问题之一,然而在Inside君之前的两篇博客中(1,2)中都已经提到了MySQL 5.7版本已经支持“真正”的并行复制功能, ...