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 ...
随机推荐
- Workflow Builder 2.6.3 Certified on Windows 10 for EBS 12.x
By Steven Chan - EBS-Oracle on May 17, 2016 Workflow Builder 2.6.3 is now certified on Windows 10 de ...
- 【OpenGL ES】关于VBO(Vertex Buffer Object)的一些坑——解析一些关于glBuffer的函数
最近在写毕设的时候用到OpenGL ES中的VBO,由于对一些接口用到的变量不了解被坑得很惨,在此记录一下防止以后再被坑. 本文为大便一箩筐的原创内容,转载请注明出处,谢谢:http://www.cn ...
- dateTimePicker编辑状态下,取值不正确的问题
当对dateTimePicker进行编辑,回车,调用函数处理dateTimePicker的value值时,其取值结果是你编辑之前的值,而不是你编辑后的值,虽然dateTimePicker.text的值 ...
- js 复制粘贴功能记录
最近工作中需要在前端页面中使用代码完成剪贴板的读写,网上搜索了下相应的资料,记录下... 这个功能有两个办法一个是js方式,一个是使用flash 一.JS方法 1.复制 首先复制的过程分为两步曲,无论 ...
- PostgreSQL java读取bytes字段
写入bytea: File img = new File("/tmp/eclipse.png"); fin = new FileInputStream(img); con = Dr ...
- 【转】斜率优化DP和四边形不等式优化DP整理
(自己的理解:首先考虑单调队列,不行时考虑斜率,再不行就考虑不等式什么的东西) 当dp的状态转移方程dp[i]的状态i需要从前面(0~i-1)个状态找出最优子决策做转移时 我们常常需要双重循环 (一重 ...
- 使用IntelliJ IDEA开发SpringMVC网站的学习
最近开始了“使用IntelliJ IDEA开发SpringMVC网站”的学习,有幸看到一份非常完善的学习资料,笔者非常用心的详细注释了一份关于博客的开发过程和细节,并且在评论中回复大家提出的问题,非常 ...
- word中如何将空格变成换行
大家在工作和学习中可能会遇到文字替换或符号替换,大家要学会txt.doc.xls之间的切换,替换好之后放到最终的文件中,txt好处是没有格式,doc个好处是有格式,而xls主要是分配到单元格中. 那么 ...
- 一起来看CORE源码(一) ConcurrentDictionary
先贴源码地址 https://github.com/dotnet/corefx/blob/master/src/System.Collections.Concurrent/src/System/Col ...
- Winform、WPF、Silverlight、MFC区别与联系
WinForm 在Windows中,诸如窗体绘制等功能由GDI(图形设备接口)实现,放在操作系统内核中.Windows Forms在底层使用的是GDI+.GDI+是GDI的“面向对象包装”,使用C++ ...